How to Set up Gmail SMTP Server on Ghost CMS.
If you hold a Gmail account, you can use the Gmail SMTP server for free to send up to 500 emails per day (at the time of this writing).
That's more than enough for most Ghost publications.
Generate an App Password for Ghost
Log in to your Gmail or Workspace account, then open https://myaccount.google.com and navigate to
Security > Signing in to Google > App passwords.
Click Select app, choose "Other", and provide a name (e.g. Ghost SMTP)
Click Generate, then copy down the password exactly as written and keep it handy.
⚠️ You will only have one chance to write down the password.
If you miss this step or made a mistake, then delete the password and start over.
Set up SMTP Server for Ghost
Configure Ghost email settings
Ghost uses Nodemailer to send emails, and the configuration for Nodemailer can be found in the Ghost config.production.json file.
Navigate into your installation directory
cd /var/www/your_site_name
Edit Ghost config.
The ghost configuration file may contain a default mail block.
$ sudo nano config.production.json
Comment out or remove the default configuration if it exists, and replace it with the following config.
"mail": {
"from": "your_email_address",
"transport": "SMTP",
"options": {
"host": "smtp.gmail.com",
"port": 587,
"auth": {
"user": "your_email_address",
"pass": "your_app_password"}
}
},
Save your configuration file and run ghost restart
to apply the updated configuration.
After Ghost has restarted, open a new incognito window and point your browser to yourdomain.com/ghost.
Voi·la!