0

I have used the Blat email line below in Studio 2017 and 2019 but it does not appear to work in Visual Studio 2022. Does anyone know what the issue is or suggest an alternative please?

Shell("C:\Windows\System32\blat.exe -body "" "" -attach ""spreadsheet"" -log C:\service\MailSend.log -debug -base64 -to ""name@company.co.uk"" -subject ""report - " & Date.Now.AddDays(-1).ToString("ddMMyyyy")Blat email & """ -server [ipaddress] -f ""MV_NoReply@company.co.uk""")

many thanks

Robert Bee

mahooresorkh
  • 1,361
  • 2
  • 8
  • 16
Robert Bee
  • 11
  • 3
  • What isn't working? Are you getting an error? – Andrew Mortimer Feb 23 '22 at 10:44
  • 1
    Blat is a command line SMTP client. Which is fine in batch (CMD) files and such.I've used it with great results there. But since you're using VB.NET, why not use the .NET framework's [SmtpClient class](https://learn.microsoft.com/en-us/dotnet/api/system.net.mail.smtpclient?view=net-6.0) instead? – Hel O'Ween Feb 23 '22 at 14:54
  • If not the built in SmtpClient then maybe MailKit – Hursey Feb 23 '22 at 20:02

0 Answers0