Unablr to send scripts by Sendmail method
I am trying to send mail for all executed testItems.
But facing below error
"Unable to send email to the smtp.gmail.com server."
Below the code I am using.
Sub Test
.
Call Log.SaveResultsAs("C:\Users\Music\10feb\Logmera1.mht", lsMHT)
Test1()
End Sub
Function Test1
If SendMail("xyz@gmail.com", "smtp.gmail.com", "John Rliff", "master@gmail.com", "Test Complete Automation Report", "Hello Team, Kindly find the attachment.", "C:\Users\Music\10feb\Logmera1.mht") Then
Log.Message "Mail was sent"
Else
Log.Warning "Mail was not sent"
End If
End Function
Hi kaiiii ,
it seems from q cursory google search, (https://stackoverflow.com/questions/10509699/must-issue-a-starttls-command-first) that the error is related to gmail's authentication system rejeting the use of their servers for security reasons.
From the document on the builtin sendmail functions, it seems that you have to enable some features within your gamil account to use TestComplete's builtin sendmail function
(https://support.smartbear.com/testcomplete/docs/scripting/sending-email-from-scripts.html)
in the "using CDO objects section"
Hi,
yes, that's right. If You want to send mail by Gmail You need to switch this bubble on:
https://myaccount.google.com/lesssecureapps
this link will get You directly to the website (if You are logged in)
also, it's important to use this parameter when You are sending an e-mail by google:
-
SMTP: smtp.gmail.com
-
Port: 465
-
SSL: true
-
smtpconnectiontimeout: 30
-
smtpauthenticate: 1
and i think that You also need to use the second solution from this Doc:
https://support.smartbear.com/testcomplete/docs/scripting/sending-email-from-scripts.html
-