Unable to send email using Send SMTP mail Activity

hi There,

I am getting below error while sending a mail. I have made sure that my credentials as well as all other parameters are correct.

Thanks!

First check this link Error sending Outlook mail with Send SMTP mail message - #7 by marian.platonov

Ping smtp.office365.com in command prompt and check the address you get as result. try using that address and see if it helps.

Below are some other possibilities to check:

Assuming you have right credential values and passing as expected --excluding this.

check these

  1. SMTP service need to be enabled on the mailbox
  2. If mfa is enabled too you’ll need to generate an app password
  3. TLS : TLS 1.2 may be now required

I cannot run Powershell script on my machine as it is disabled by admin

You can bypass this policy for a single file by adding -ExecutionPolicy Bypass when running PowerShell

powershell -ExecutionPolicy Bypass -File script.ps1

Or ask your admin to run the Script for you.

Thanks Marian,

I ran the script but getting same error there as well. Please refer the attached screenshot.

Well, the issue is not in the UiPath Studio or Mail activity package.

The same error message was replicated in your PowerShell script. Please look online for a solution for your encountered error message.

Alright, thanks for your help much appreciated.

Hi Rahul,

Follow these steps
Open Gmail Settings -->Security → 2-StepVerification → Enter Password -->Verify.
It turns on as shown in the screenshot.
image

Hi Vaishnavi,

I am using outlook, so can you please suggest about that.

So, Are you using “Send Outlook Mail Message” Activity ?
Because “SMTP” Activity is used for Gmail Account .

I am using send SMTP mail activity with outlook credentials the issue is not with UiPath rather with outlook

You need to use “Send Outlook Mail Message” Activity not SMTP.

1 Like

Thanks, saved my robot’s ass.