SMTP authentication error after version 1.9.5 UiPath.Mail.Activities

Hi,

I’m sending an email via SMTP, if I try to send authenticated until the UiPath.Mail.Activities v1.9.5 version works, but if the version is higher than the UiPath.Mail.Activities v1.9.5 it gives an error, as shown below:

ERROR:

SUCESS

ERROR TESTED VERSION UiPath.Mail.Activities: 1.9.6; 1.10.4; 1.10.5

@joao_adelio1 @ovidiuponoran

Even I am also facing this same issue. I have to use the v1.9.5 for the sending the mails.

@kumar.varun2 can you please send me the error message you get?

@kumar.varun2 @joao_adelio1 can you please give me the value you are using for parameters? For me it works fine in 1.10.5 when using Server = “smtp.office365.com”, and Port = 587, SecureConnection = Auto.

@ovidiuponoran

Source: Send SMTP Mail Message

Message: 535: 5.7.3 Authentication unsuccessful

Exceptioan Type: MailKit.Security.AuthenticationException

RemoteException wrapping MailKit.Security.AuthenticationException: 535: 5.7.3 Authentication unsuccessful 
   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)

Also, in v1.9.5, while using the secure string as password the same exception is thrown so I have to use the plain string as password

Server = “smtp-exchange.sicredi.net
Port = 25

while using the secure string as password the same exception is thrown so I have to use the plain string as password

image

try this, in the normal string field:

New System.Net.NetworkCredential(String.Empty, SECURE STRING).Password.ToString()

replace secure string with your secure string coming from the orchestrator for example, that was the way I found not to expose my password in the code

You need to use 1.9.6 or newer to get the activity working correctly when setting a value for SecurePassword parameter. If you have to use 1.9.5 then you should use Password field instead.

I tried with version 1.10.5 and it didn’t work.

Looks like it worked but the username/password is wrong.

It’s not incorrect brother, if I put the method in the normal string:

New System.Net.NetworkCredential(String.Empty, password).Password.ToString()

which simply converts the secure string into a normal string, works correctly, believe me I’ve done all possible tests :smiley:

1 Like

Sounds like your mail server doesn’t support secure authentication and so it sees the secure pwd as an incorrect pwd rather than decrypting it. Also could be a certificate issue.

@joao_adelio1 @kumar.varun2

I tested with versions 1.9.6, 1.10.4, 1.10.5 and 1.11.0-preview with both Password = “{my-password}” and SecurePassword = new System.Net.NetworkCredential("", “{my-password}”).SecurePassword. I used Server = “smtp.office365.com", Port = 587, SecureConnection = Auto.
==> All runs were successful, i.e. the email was successfully sent and received.

Note: the first execution failed with an authentication error but the reason was that I haven’t used my outlook.com account for a while so Microsoft blocked the access to my Inbox. But after I reviewed my activity and confirmed it was me initiating the call, everything worked fine.

1 Like