"Authentication Failed" when using SMTP Mail Message Activity

Hello,

I am using trial version of UI Path version ( 2016.2.6165). Following are the configurations used

Server ( IP address ) and Password are enclosed in double quotes (hidden for this discussion)

When I run this program, I get following message in Log file

“Send SMTP Mail Message : Authentication failed.”,

Tests done:

  1. I tested the connection to Mail server using Telnet and it works fine.
  2. Connected to Mail Server using internet email (owa) with logon(email) and password mentioned in the image and it works fine.
  3. Mail server is configured accept messages from my PC.( My PCs IP address is enabled in Mail Server)
  4. Tried given full server name instead of IP address; resulted in more issues.
    ================================

Please advice what needs to be done to remove Authentication issue
Thanks

1 Like

Hello @Paddy2165 ,

Did you find a solution for your problem ? because I have the same issue !

Thanks

Hello @Paddy2165,

I also have the same issue. Mine is a trial license. Perhaps that may an issue?

Thanks
Jane

PS. From the command line I am successful sending an email using blat. using only a server, from and to specified. No authorisation was required

Hi, my problem almost the same. I get error: “Send SMTP Mail Message: 5.7.1 addres@mail.lt : Relay accesses denied”

Help please
Andrius

This is usually related to 2-step authentication. Something you can test out easy: generate a google app password and use that instead of your normal account password.

More details here: https://www.uipath.com/kb-articles/enabling-email-activities-for-gmail

Hope this helps.

Mircea

4 Likes

I am facing the similar issue (ERROR : “Send SMTP Mail Message : Authentication failed”) ,

Should be there any additional settings must be done on the SMPT server for the ID that used for sending email ? which is currently configured with host server where orchestrator is installed(And I am able to send emails using command line from that host.)

Any advise would be appreciated. Thanks!!!

What if you turn less secure apps ON: https://myaccount.google.com/lesssecureapps?

That works perfectly fine using GMAIL but the issue is when using Corporate SMTP mail server.

I have provided all the details pertains to my corporate SMTP mail server details in “SendEmail Properties”

BUT still getting error " Send SMTP Mail Message : Authentication failed.".

Any setup should be done on SMTP server level ?

Hi Jaison,

You could ask the IT team to make modifications in the server settings to allow less secure apps(it seems like it “sees” UiPath Robot as a less secure app and that’s why it’s not allowing the Robot to access the server)

or

Install Outlook and access the SMTP server via Outlook, as it is a high secure app so the SMTP server will not restrict it.

Here are some links that will guide you more about the SMTP restrictions in Gmail server(which is also a SMTP server):

https://help.crucial.com.au/hc/en-gb/articles/214180837-Enabling-Less-Secure-Apps

There are ways to allow low secure apps to access SMTP server. For example, to access gmail server, you need to provide app generated password instead of user password. Similarly, if your SMTP server has some security setting like that, you can use it.

1 Like

This worked for me!

@mircea, your post helped me setting up smtp mail.
Thanks,
Sanjay

Hello Jaison, did you solved this? Im facing the same problem.

Thanks,
César

No, We cannot make any settings to our Corporate SMTP server.
Instead we used OUTLOOK for email functionality.
Also we can use (Invoke code Activity) vb.net code to send email using SMTP.

Hi,

issue explained clearly in the below video,

thanks.

2 Likes

hi,
you need to enable , Allow low secure apps checkbox in Gmail.

Please follow below tutorial.

Thanks,
Karthik

request you to please share the code

Use the SmtpClient class within the System.Net.Mail namespace

can we import smtpclient class in invoke code activity?

System.Net.Mail namespace should be imported by default in Studio. You would be able to see it by clicking “imports” on the bottom and scrolling through to find it. If you can’t , then just type it above to import it.

Once System.Net.Mail is imported, then you’ll have access to it and can use SmtpClient class in invoke code activity.

got it thankyou buddy