The package has been configured successfully. The mail configuration stored inside config/mail.ts
file relies on the following environment variables and hence we recommend validating them.
Open the env.ts
file and paste the following code inside the Env.rules
object.
SMTP_HOST: Env.schema.string({ format: 'host' }),
SMTP_PORT: Env.schema.number(),
SMTP_USERNAME: Env.schema.string(),
SMTP_PASSWORD: Env.schema.string(),
- The
SMTP_HOST
should always be present and formatted as a validhost
. - The
SMTP_PORT
should always be present and a valid number. - The
SMTP_USERNAME
andSMTP_PASSWORD
are required to authenticate with the SMTP server. If you are not using authentication, then remove these environment variables and update theconfig/mail.ts
file to not reference them.
The SES driver needs to authenticate with the Amazon web services. You can begin by creating an IAM role with the ability to send emails using SES and copy/paste the secret key
and the access key
inside the .env
file.
SES_ACCESS_KEY: Env.schema.string(),
SES_ACCESS_SECRET: Env.schema.string(),
SES_REGION: Env.schema.string(),
You just need the Mailgun's private key in order to send emails using the Mailgun driver.
MAILGUN_API_KEY: Env.schema.string(),
MAILGUN_DOMAIN: Env.schema.string(),
You just need the Sparkpost's API key in order to send emails using the Sparkpost driver.
SPARKPOST_API_KEY: Env.schema.string(),