Failed on Simple Send SMTP Email

Hi,

I’m learning to send a simple email from an Outlook account via SMTP using UiPath Community Edition. Drag a Send SMTP Mail Message activity and set configuration on:
Port: 587
Server: “smtp-mail.outlook.com
and it throwed an exception. Tried changing SecureConnection from Auto to “StartTls” and “StartTlsWhenAvaliable” but nothing worked. Any idea what went wrong? Thank you.

Workflow Exception is quoted below:

{WorkflowName} has thrown an exception

Source: Send SMTP Mail Message
Message: The SMTP server has unexpectedly disconnected.
Exception Type: SmtpProtocolException

MailKit.Net.Smtp.SmtpProtocolException: The SMTP server has unexpectedly disconnected.
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)

Do you have permission to programatically send emails from Outlook? This requires the same permission as, for example, MS Excel uses to send emails.

No experience in sending emails using MS Excel.
I googled it but didn’t seem to find the one matching my situation.
Aside of that, I thought if I use Send SMTP Mail activity, I don’t need to set up my Outlook (it’s only if I use Send Outlook Mail), was I wrong?

Ah sorry, which provider are you trying to use? i.e. gmail…

Thank you for your kind reply.

Using Microsoft’s Office 365 account (a must from company).
“Send SMTP Mail Message” Activity.

Have you tried with port 995 with SSL?

https://portal.smartertools.com/kb/a2862/smtp-settings-for-outlook365-and-gmail.aspx

If neither work I suspect your company security policy is blocking it.

5 Likes

SSL didn’t worked on my case, but the setting with TLS secured connection worked! Really appreciate the kind response for trivial questions.

2 Likes