Prerequisites - Sendgrid account and getting the nessecary API keys.#
- Sign in to sengrid
- go to
settings -> api keys -> create api key
- As always, you should follow the “principle of least privilege” and chooce restricted access and select Mail send.
- Hit Create and view.
- Save the api key - you will need it in the next step.
Setting up the server#
- SSH to you droplet
- Navigate to the ghost configuration file by typing in
cd /var/www/ghost
- Open up the config file by typing
vi config.production.json
to open it with vim.
- Next, change the setting under mail configuration.
- Paste the api key from sendgrid portal.
- You are done! You can now send invites to fellow contributors.
"mail": {
"transport": "SMTP",
"options": {
"service": "Sendgrid",
"host": "smtp.sendgrid.net",
"port": "587",
"secureConnection": false,
"auth": {
"user": "apikey",
"pass": "GET_API_KEY_FROM_SENDGRID_PORTAL"
}
}
Test and verify#
- Inside ghost admin panel navigate to
settings->labs
.
- At the bottom of the page there is a button for sending a test email.