Open Installation - Email

In order to receive emails on Diffgram with your opencore installation, you will need to setup an email provider. Otherwise all email features will be disabled by default.

The Default mail provider is Mailgun. It's free for a basic account with them and we have been very happy with them.

Simply set the env variables

  1. MAILGUN_KEY
  2. EMAIL_DOMAIN_NAME
    For example we use EMAIL_DOMAIN_NAME= 'mail.diffgram.com'
    Make sure the domain name is in the allowed list of domain in the mailgun app (https://app.mailgun.com/app/sending/domains)
  3. Set EMAIL_VALIDATION to True

Testing if Email is Working

One way to do a quick test for email sending in diffgram is to check if the login screen now shows a "Send Magic Link" button.

If it's not showing it, double check if you added the correct ENV variable in the above steps.

If you are able to see it, input the email of your diffgram user and click send magic link. You should receive a link for doing a login in your email.

If you're not receiving it, please check mail gun's logs in the platform to see if there is any other issue with the mailgun configuration. (Go to mailgun's Log Section)

Using a Different Mail Provider

If you need to swap to a different provider you can change it in Communicate_Via_Email, e.g. by changing the post request address. Feel free to submit a PR if you want to support a custom SMTP server.


Did this page help you?