4

I seem to be running in circles..

I tried Install-Package -Name 'MailKit' -Source 'nuget.org' but it was unable to find package source nuget.org

I tried a local installation from a download, which just kept asking for dependant packages, such as System.Buffers, then Portable.BouncyCastle which installed but then followed System.Security.Cryptography.Pkcs, which ended stating "Dependency loop detected for package"

Is anyone able to offer a route to installing MailKit for use with Powershell, or offer an alternative for sending e mail from Powershell?

I only need send an occasional notification mail (1 per day??) from a script, but SendMail keeps issuing warnings it should not be used and is obsolete.

Steven
  • 6,817
  • 1
  • 14
  • 14
Derek Martin
  • 91
  • 1
  • 4

1 Answers1

5

After posting the question and reading more threads, I tried these commands which seem to have worked, although I'm not sure if I'm missing any relevant dependencies:

Install-Package -Name 'MimeKit' -Source "https://www.nuget.org/api/v2" -SkipDependencies

then

Install-Package -Name 'MailKit' -Source "https://www.nuget.org/api/v2"
Steven
  • 6,817
  • 1
  • 14
  • 14
Derek Martin
  • 91
  • 1
  • 4