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.

2 Likes

Hi,
I’m facing exactly the same issue.

With exactly same set-up(same VM, username, password, server, port) -
Send SMTP Mail Message activity works well up to package version 1.9.5.

since version 1.9.6 and higher (1.10.4,1.10.5) I’m getting error message:
MailKit.Security.AuthenticationException: 535: 5.7.3 Authentication unsuccessful
** at UiPath.Mail.Activities.SendMailActivity.EndExecute**

Tested with various accounts, passwords as a plaint text or secure string - no help.

Seems to me like a bug in the newer versions of the UiPath.Mail.Activities package.

P.

2 Likes

Hi,

I am facing exactly the same issue…
If you had a feedback and a workaround…

Thanks,

Maurizio.

20.10.4+Branch.master.Sha.6a6cfd6dfbeb86aec47564af2f9465ef0bf43df4

Source: Send SMTP Mail Message

Message: 535: 5.7.3 Authentication unsuccessful

Exception Type: System.Exception

RemoteException wrapping System.Exception: 535: 5.7.3 Authentication unsuccessful
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at UiPath.Executor.BaseRunner.EndExecute(IAsyncResult result)
at UiPath.Executor.OutOfProcessRunner.EndExecute(IAsyncResult result)
at UiPath.Core.Activities.ExecutorInvokeActivity.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)
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at UiPath.Executor.BaseRunner.EndExecute(IAsyncResult result)
at UiPath.Executor.InProcessRunner.EndExecute(IAsyncResult result)
at UiPath.Core.Activities.ExecutorInvokeActivity.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)

Didn’t find any solution to this. I am using the 1.9.5 version of mail package to avoid this problem.

Can you please try with the attached mail package?

UiPath.Mail.Activities.1.13.0-alpha.2080912.nupkg (8.3 MB)

Hi @ovidiu.iliescu

With the following attributes

UiPath Studio Version : 21.10.3
Mail Package Version : 1.12.2, 1.13.0-aplpha.2080912
port : 25
Secure Connection : None

It is working with both the versions of package.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.