SMTP Authentication with Microsoft Exchange Server

Hi all,
I’m having issues making UiPath Send emails using SMTP with an Exchange Server.
The customer environment only allow us to use non-encrypted, non-authenticated SMTP protocol, relay privileges is granted by IP Address. We tested SMTP features using a full e-mail client in the robot machine and mails are sent, so there are no networking issues, blocked ports, etc.

When using the SMTP send mail activity in UiPath we get the following error:
Main has thrown an exception

Source: Send SMTP Mail Message
Message: No compatible authentication mechanisms found.
Exception Type: NotSupportedException
System.NotSupportedException: No compatible authentication mechanisms found.
   at UiPath.Mail.Activities.SendMailActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
   at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
   at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Any idea on how to use plain (non authenticated) SMTP from UiPath?

Thanks!

Hi,
In case someone has the same problem, I couldn’t found a way to make UiPath send SMTP Mails without Authentication, so we had to change the backend SMTP server to accept Authentication.

After that the Robot is able to send mails.

Best Regards.

Hi,

Have you tried using “SecureConnection” property to NONE of “SEND SMTP MAIL MESSAGE”?

Thanks,
Andrei

Hi Andrei,
Yes, tried that just now to double-check.
It does not work using SecureConnection to NONE.
Same error.

Thanks,

@Andrei_Cioboata: I am also facing the same issue. The SMTP server is used enterprise wide level in the customer company. I’m not sure if I will have the leverage to ask to change in the backend. Are there any workarounds to this issue?

Hi PD2,
My workaround was to install hMailServer (an Open Source Mail Exchanger for Windows) on the local machine and configure it with a dummy domain and user just for SMTP authentication. Then in the outgoing settings hMailServer would forward all mails to the backend corporate SMTP servers. UiPath uses the the dummy user to authentication with hMailServer but using the real address on the From and ReplyTo properties.

Encountered this issue at two different places. First place agreed to change their server settings so it could work. Second place, I decided to try write it using .NET directly, which turned out to be quite easy as you can just use the SmtpClient class.

e.g.
Invoke Method
Target Type: (null)
Target: new SmtpClient(server,port)
Method: Send
Parameter collection:
String = sender (any valid address)
String = recipient
String = subject
String = body

(Could equally create a MailMessage object to use as the sole parameter.)

2 Likes

Thanks a ton for this :slight_smile: Exactly what I was looking for.