Configure SMTP for Anonymous mail

How to configure SMTP without username and password.
it is giving me authentication error but SMTP using Powershell is working fine for same
@badita please help

2 Likes

I too exactly have the same issue, UiPath force for authentication always.

There is no settings to turn it off.

Someone please Help!!!

Just send the message via invoke code using SmtpClient. Remember to import System.Net.Mail namespace.

Sample code below:

Dim smtpClient As SmtpClient = New SmtpClient()
Dim mailMessage As MailMessage = New MailMessage()

mailMessage.To.Add(recipient)
mailMessage.From = New MailAddress("emailaddress@yourdomain.xyz", "Name")
mailMessage.Subject = "Subject"

mailMessage.IsBodyHtml = True
mailMessage.Body = yourMailBody

smtpClient.Host = yourSmtpHost
smtpClient.Port = yourSmtpPort

smtpClient.Send(mailMessage)
2 Likes

I am getting target invocation exception when I run the code