简体   繁体   中英

Error sending e-mail from Google VM

I have a C# application that sends emails using the smtp of my customer and it is not working on Google Cloud VM (Windows), but it is working on Azure VM or any local machine.

The exception that is happening is:

Failure sending mail. Unable to connect to the remote server A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond [IP SMTP]

Is There some configuration on Google Cloud Console that I could try to solve it? Why I can't send emails from a Google VM?

I found in Google Cloud docs that ports 587, 465 and 25 are blocked and there is no way to unblock it. The solution I found was ask to my customer to create a VPN connection on his SMTP server and I connected with it by another port.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM