- ensure that you have a working email address in the hosted domain such as
notification@ourbigbook.com
. E.g. on our custom domain name setup with Porkbun. We achieved this by redirectingnotification@ourbigbook.com
to your personal email initially. - create a Sendgrid account
- it would also be a good idea to setup two factor authentication
- verify your domain, e.g.
ourbigbook.com
. This means setting up threeCNAME
records given by Sendgrid on your DNS provider, e.g. Porkbun. - create a single sender. We used:
- From Name: OurBigBook.com
- From Email Address:
notification@ourbigbook.com
- Reply to:
notification@ourbigbook.com
- we disabled their "link tracking" feature, which was turned on by default. While it is fun to track clicks, it is basically useless for transactional email, and it parse HTML and replaces the links with their tracking links, making things less clear for end users. It is also harder to debug.
- integrate using web API
- create an API key, and then save it on Heroku:Also set it locally to be able to test email sending integration locally:
heroku config:set -a ourbigbook SENDGRID_API_KEY=thekey
Then, to verify that the email sending is actually working run;echo ourbigbook SENDGRID_API_KEY=thekey >> web/.env
and try to register some of your real emails. You should actually receive the email at this step. The email appears as sent from:OURBIGBOOK_SEND_EMAIL=1 npm run dev
gmail accepted the email under promotions without domain verification, but outlook sent it to spam. Make sure to click "it is not spam" in that case.ciro@ourbigbook.com via sendgrid.net
- create an API key, and then save it on Heroku: