DUDANF
DUDANF

Reputation: 2990

Sending mail using GCP on private network

More than a simple question-answer, this is more of a recommendation post. Want to see what ideas I have to work with. I am working on porting my company's work to the cloud (GCP) Most of this work is in the form of a pipeline. I'd like to notify completion via email.

The company I work for has a private network. And so the only way to use their mail config is to send it through their internet, and so, cannot use their SMTP-config from GCP.

What's the best way around this?

I'm looking into creating a VPN between GCP and our local network, however, that may not be possible (IT restrictions)

Do I have any other options?

EDIT

What an SMTP Relay work? This guy.

Upvotes: 0

Views: 542

Answers (1)

Ernesto U
Ernesto U

Reputation: 806

By default, Compute Engine allows outbound connections on all ports but port 25,so if you need to send an email from the instance you have to use port 465 or 587.

GCP explecitely recomends using other third-party tools such as SendGrid, Mailgun, and Mailjet because they offer a free tier package, you can skip all that and connect your instance to Gmail SMTP Relay Service. You will need a Google Account to connect (gmail or Gsuite).

Instructions to configure the Google Account are HERE , I tested sending emails from my MySQL server and Debian 9

Upvotes: 1

Related Questions