Skip to main content

📧 Emails

A Retrospected instance sometimes need to send email to its users, when they register or want to change their password.

You have three mechanism for sending emails (or not) you can choose from:

  • Mailjet
  • SMTP
  • Nothing: no emails are sent

If you don't specify any mechanism (neither Mailjet nor SMTP), verification emails won't be sent and users will be able to register any email. It also means they won't be able to change their password if they forget it.

You have two ways of solving this problem:

  • Use the Admin Panel, if you are the admin, to manually change someone else's password
  • Setup Mailjet or SMTP so that emails are verified, and recovery emails are sent if a user forgets their password

The latter is what we are going to setup in this guide.

Is it free?

Mailjet's free plan includes 6,000 emails per month, with a maximum of 200 emails per day. For a self-hosted instance, you are very unlikely to have to pay for it.

When MAILJET_API_KEY is set, Retrospected sends through Mailjet and does not use SMTP.

Get an account and API keys​

  • Go to Mailjet's signup page and register. The address you sign up with is validated as a sender.
  • Open API Key Management and copy the API key and the Secret key for the primary key. Mailjet shows the secret key when the key is created.
  • To send from another address, add it under Sender addresses & domains and complete the validation email or domain check. Mailjet rejects mail from a sender that is not validated.

Set the environment variables​

We should now have all the information we need. In the backend section of your docker-compose.yml file, add the following variables:

  • MAILJET_API_KEY: the API key from the section above
  • MAILJET_SECRET_KEY: the secret key from the same API key
  • MAILJET_SENDER: the validated sender address, usually the email you used to create the Mailjet account
  • BASE_URL: this is the URL to your self-hosted Retrospected (for example: http://retro.mycompany.com)

Done!​

Now that it is setup, your users should now need to verify their email and will be able to reset their passwords themselves.

SMTP​

Setting up SMTP​

In the backend section of your docker-compose.yml file, add the following variables:

  • MAIL_SMTP_HOST: SMTP server host (example: smtp.myemail.com)
  • MAIL_PORT: SMTP port (usually 465 for secure SMTP)
  • MAIL_SECURE: If SMTP is using encryption, usually via port 465, set this to true
  • MAIL_USER: SMTP username (or email)
  • MAIL_PASSWORD: SMTP user password
  • MAIL_SENDER: SMTP sender email (usually matches MAIL_USER)
  • MAIL_ALLOW_SELF_SIGNED_CERTS: Only set to true if you want to (unsafely) allow an SMTP server with self-signed certificates