Forum Discussion

kaiiii's avatar
kaiiii
Regular Contributor
5 years ago

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."

Error message: "Must issue a STARTTLS command first. n16sm4366861otk.25 - gsmtp

 

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