Allow custom SMTP configuration for sending emails
Feature Request
Currently we run code in Google Cloud Platform (Compute VM's/GKE). The problem here is that Google does not allow communication over email ports so it's not possible to send emails using standard mail functions.
To address this we will usually setup a custom SMTP provider on port 2525. It would be great to add configuration options to allow sending mail via a remote SMTP server on a custom port (i.e. Sendgrid, Mailgun, etc...). I believe features like password reset will not work without the ability to send email.
Suggested Options
- SMTP_PORT=2525
- SMTP_RELAY=smtp.sendgrid.net
- SMTP_LOGIN=myuser
- SMTP_PASSWORD=mypass
Security Concerns
Using SMTP_LOGIN and SMTP_PASS in plain text env vars might be an issue for some users so perhaps there can be an option to provide an SASL password map or something comparable and native to Golang.
We usually mount secure data in kubernetes with secrets, so either would be sufficient for my needs.