SendMail function on Azure Cloud VM
I have following strange situation:
Created a script using SendMail, which sends a simple email. Running it on TestComplete local machine works perfectly.
Running the exact same script in Azure VM, I get the error message: "5.7.0 Must issue a STARTTLS command first".
Manually sending an email (using any normal email client) from within same Azure VM works also perfectly, but it takes a little more time (a few more seconds).... Maybe SendMail has a little to low threshold value and throws an error too soon?
Anyone got an idea on how to solve this? Any tips on sending emails from TC in Azure Virtual Machines?
Used script:
Sub Email()
If SendMail("m.groen@BLABLA.COM", "smtp-mail.outlook.com", "testrunner", "testrunner_dp@BLABLA.COM", "Message!", "This is a test message", "C:\a\File1.txt") Then
Log.Message "Mail was sent"
Else
Log.Warning "Mail was not sent"
End If
End Sub
I have been able to send email from an Azure Cloud VM is only using Gmail and SSL.
The solution is described on page 3 on this thread.