Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.
I understand that you would like to access the FQDN "gmail-smtp-in.l.google.com" on ports 25 and 587.
Please let me know if this is incorrect.
First of all,
- Is the server "gmail-smtp-in.l.google.com" accepting requests to port 25 and 587?
- I do not think so.
- From my local machine, the connections are failing.
-
- This simply indicates that the problem is not with Azure VM, rather the destination server.
Do you have any other VM or working setup(local server) where telnet to Ports 25 and 587 actually succeed?
Also, Please check : Recommended method of sending email
- The Azure platform will block outbound SMTP connections on TCP port 25 for deployed VMs
- Only exception is customers using Enterprise Agreement
Kindly let us know if this helps or you need further assistance on this issue.
Thanks,
Kapil
Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.