Misha Zaslavsky
Misha Zaslavsky

Reputation: 9616

Unable to send mails with SMTP in GCE instances

While migrating from AWS EC2 instances to Google Compute Engine instances we got problems with sending emails via SMTP (Sendgrid).

I read a lot about it and read that the ports (587, 462, 25) of SMTP are blocked... And to read this article. https://cloud.google.com/compute/docs/tutorials/sending-mail/#sending_mail_through_corporate_mail_servers

Questions:

  1. For my understanding we should open a Cloud Launcher of SendGrid?
  2. If (1) = yes, then I see it (the cloud launcher) does not support C# and our code today of sending emails is based on C#. So that we will have to change the code to one of those: Node.js, Python, Ruby, Go & PHP?
  3. Is there any way to unblock this outbound connections on port 587 (or 462, 25)? Without Cloud Launcher.

Thanks in advance

Upvotes: 0

Views: 504

Answers (1)

Kalana Demel
Kalana Demel

Reputation: 3266

1) Yes, if you want to use it through google. If not I recommend directly going to one of the smtp providers such as sendgrid, spakpost, mandrill... to get and account and use their smtp service to send mail.

2) You can use C# by simply not using the Cloud Launcher and purchasing an account directly from the vendor and usning their SMTP service.

3) No, port 2525 is free to send outbound emails to smtp providers through GCP so I highly recommend using that since it can be used for sendgrid as well.

Upvotes: 1

Related Questions