Ask a Question

SendMail not sending the email

mesg2anil
Regular Contributor

SendMail not sending the email

Hi,



I'm trying the below code to send the email through SendMail, it is not working. Our email is linked with gmail.com so the host will be smtp.gmail.com. I still cannot send an email. What could be the issue?



Below code is throwing "Mail was not sent" message 😞


Sub mail



If SendMail("anil@mail.com", "smtp.gmail.com", "Anil Yadrami", "sunil@mail.com", "Notification", "Hello Anil, Your application is nice.") Then


Log.Message "Mail was sent"


Else


Log.Warning "Mail was not sent"


End If

End Sub



 

7 REPLIES 7

RE: SendMail not sending the email

Hi Anil,



To learn how to send e-mail messages from a GMail account, refer to the following How To entry:

Send an e-mail message

Best regards,
Alexey

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
mesg2anil
Regular Contributor

RE: SendMail not sending the email

Hi Allen,



Thanks a lot for the link!!

The link which you suggested is for gmail account, in case if I want to send the an email using work email id, do I still need to follow same procedure?

RE: SendMail not sending the email

Hi Anil,



If your work account is not hosted on GMail, you can simply use SendMail.

Best regards,
Alexey

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
mesg2anil
Regular Contributor

RE: SendMail not sending the email

Hi Allen,



Thanks a lot for the info...!!
Nikhil_Mcafee
New Contributor

RE: SendMail not sending the email

Hi Allen



The sendmail method doesn't work. I am getting an error msg as "Socket Error # 10060"



Can u please help me in resolving this issue.



With Regards

Nikhil
vex
Contributor

RE: SendMail not sending the email

Probably blocked.  You can try to telnet into it.  If you see something along the lines of:



220 mail2.mailprovider.net ESMTP




Then it's not blocked.  If you can't reach it, then you're behind a firewall that is blocking that smtp server.

RE: SendMail not sending the email


Hello Nikhil,



This error is not TestComplete-related. Check the settings you specified for e-mail (the parameters of the SendMail method) with your system administrator.







--
Dmitry Nikolaev

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
cancel
Showing results for 
Search instead for 
Did you mean: