python instruction smtplib.SMTP("", 587) does not return on linux azure VM

Ismi 1 Reputation point


I wrote python a script to send an email from an .com email address.

the script works correctly on my windows pc, and on my local virutal linux macchine.
but when i run the same script on linux VM in Azure, the command smtplib.SMTP("", 587) never returns.
this is a screenshot of the traceback when I interept the script

Could you please help me to fix this issue?
Thank you.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
4,615 questions
{count} votes