How to setup basic SMTP for Ghost
Almost everybody has Gmail, right? But a small amount of those knows, that it also includes free SMTP service, which is the same as other Google products: fast&reliable.
Everything you need is your email and dedicated app password (for security reasons).
To generate this password :
- Go to https://myaccount.google.com/apppasswords
- Enter your regular password from your Google account (this is security settings)
- Select app, choose Other, and put the name (i.e SMTP)
- Now copy your password and write it down (you will have no chance to see it for the second time here)
For Ghost setup, I was using DO droplet, you could use a different way, but the whole flow should be similar or the same.
Now, to setup SMTP for your Ghost:
- Go to your project directory
cd /var/www/ghost
- Open to edit your
config.production.json
- Copy and paste config object for
mail
and filluser
andpass
with your creds
"mail": {
"transport": "SMTP",
"options": {
"service": "Google",
"host": "smtp.gmail.com",
"port": 587,
"auth": {
"user": "your@google.email",
"pass": "this password"
}
}
},
You could burn down the paper with this password .
As a result, all your transactional emails should work fine without any additional pain in the ass. For example, now you could invite somebody else as a content contributor to your website.
Originally published on How to setup basic SMTP for Ghost - DEV Community š©āš»šØāš»