SMTP Configuration
Authorizer can be configured to send emails as part of the authentication flow. For example, to verify a user's email address, to send a user a magic link for password less login, or to allow a user to reset their password.
Authorizer should work with any SMTP compliant email server. Please refer to the environment variables documentation for the environment variables required to configure SMTP host, port and authentication.
Using Sendgrid
Sendgrid is configured using an API Key, rather than traditional username/password login. To use Sendgrid you must:
- Create a Sendgrid account and login
- Create an API Key for your application under
Settings > API Keyswithin the Sendgrid console - Ensure that you are using a verified sender email under
Settings > Sender Authenticationwithin the Sendgrid console. Sendgrid will reject email sentFrom:unverified email addresses. - Set the relevant Authenticator environment variables. You can set them from authorizer dashboard
SMTP_HOST: smtp.sendgrid.net
SMTP_PASSWORD: <Sendgrid API Key>
SMTP_PORT: 587
SMTP_USERNAME: apikey
SENDER_EMAIL: <Sendgrid verified email>
Note: the
SMTP_USERNAMEenvironment variable must be set to the literal stringapikeynot your API key value.