Skip to content

How to email users when theyre unbanned

Chat Sumlin edited this page Dec 30, 2021 · 1 revision

So first things first, this is not a feature that is enabled by default and it is not required for you to use this project. At the moment this is achieved using SendGrid and a Single Sender Verification Email which does NOT require your domain. There is a way to use this feature for free but at a certain point (more than 100 emails sent a day) SendGrid will start to charge you.

FAQ

  1. What is SendGrid?

SendGrid is an email distribution API that allows developers to automate the sending of emails using code. You can read more about it on their website here.

  1. Why did you choose to use SendGrid over other email APIs?

This was mostly a personal choice, I know the SendGrid API well and have used it in a few other projects. Plus you get 100 emails free a day, which for most of my projects, is more than enough.

  1. Is this free

Up to 100 emails a day, yes

How to set this up for your instance.

  1. Signup for a SendGrid account

  2. Once you are in the dashboard you will be able to create a new Single Sender. Settings > Sender Authentication

Adding A Single Sender

This does require you to provide a bit of personal information but this isn't shared with other people. The From Name, From Email Address, and Reply-To address are the only bits visible to users who receive your emails.

NOTE: Your "from email" address can be a Gmail inbox if you want.

  1. Next we'll need an API Key. Settings > API Keys

API Keys

This key will need ATLEAST "Mail Send" Access if you are not granting it full access

Permissions

Note down the API key, because once you navigate away from that page SendGrid will not show you the key again.

  1. Drop your API key and "From Address" in the environment variables of your Netlify site then redeploy the site for your changes to take effect

Important REACT_APP_ENABLE_SENDGRID needs to be true