Error while sending Email

Email.Send SMTPServer: ‘smtp.gmail.com’ Port:465 EnableSSL:true SendFrom: ‘abc@gmail.com’ SenderDisplayName:‘abc’ SendTo: ‘gef@gmail.com’ CC:’’ BCC:’’ Subject:’’ Body:’’ IsBodyHtml:False Attachments:’’

I’m trying to run the above query but it’s showing error that “Failed to send mail”.

please refer the code attached,

email.AuthenticateAndSend SMTPServer: ‘imap.gmail.com
Port:25
EnableSSL:true
Username:‘AccountUserName’
Password: ‘YourPassword’
SendFrom: ‘fromA@gmail.com’\
SenderDisplayName:‘SenderA’
SendTo:‘toB@gmail.com’
CC:’’
BCC:’’
Subject:‘Test’
Body:’’
IsBodyHtml:False
Attachments:’’

image

1 Like

Hi,
I tried with the code that you have attached but it also showing the same error.

@Meghanaraj Have you configured your mail client/program accordingly?
In gmail for example you have to allow for certain functionality (IMAP usage etc).

Best regards,
J.

Hi,
I have done the changes in Email settings(In Forwarding and POP/IMAP).

@Meghanaraj if you are using gmail. You need to turn off two step verification of your Gmail account.

https://support.google.com/accounts/answer/1064203?co=GENIE.Platform%3DAndroid&hl=en

3 Likes

@Meghanaraj try also using port 587 for the outbound messages sent from the Gmail SMTP server.

Hi,
I tried by turning off two step verification of Gmail account but it showing the same error.

Hi,
I tried with different port numbers but it’s not working.

Hi,
I have done the settings as you suggested (In Gmail settings : IMAP usage etc) and also I tried different port numbers while executing but i’m getting the same error.
Someone suggested to turn off the two step verification of Gmail account but that also didn’t worked well.

Hi,
I’m trying to send mails from outlook account but it’s throwing error that "Failed to Launch Outlook ".Please find the attached screenshot.
And for gmail, I have done the changes that you have suggested but that also not working. I’m getting the error that “Failed to send mail”.

OutlookError

Can you suggest me how to edit the selectors while using UIspy and also how to execute javascript (Webautomation).