user2779653
user2779653

Reputation: 927

Best way to activate mails for Wordpress hosted by Google Compute Engine?

I recently setup a Wordpress site hosted on Compute Engine, following these instructions. One step missing is how to activate emails for Wordpress. Once the installation is all done, if I try to reset my password from the Wordpress wp-admin login page, I get this error:

The e-mail could not be sent. Possible reason: your host may have disabled the mail() function.

I see that outbound emails are not allowed by default on Compute Engine, and allowing outbound email sending for Wordpress installed in compute engine doesn't seem obvious. Could someone help with steps on how to do this?

Upvotes: 3

Views: 2208

Answers (1)

Terry Ryan
Terry Ryan

Reputation: 1911

Answer is outlined on Google Cloud Platform Documentation. But to sum up:

For the longest time SendGrid was the only solution. Google Cloud Platform has added Mailgun to the mix. Both require you to have a third party account, but both provide a better solution to handle all of the vagaries of email server administration than doing it yourself. You can setup either of these solutions as the hosts email method of choice following the directions they provide. Then you don't have to do anything to the Wordpress install to make it work, Wordpress will just use the underlying server config to send email.

You can also relay if you have Google Apps for Work.

Finally if you have your Google Cloud Project connected to your own network using VPN you can use your network to send the email.

Upvotes: 3

Related Questions