CommCareHQ SMTP settings

Hello,
i tried to setup SMTP settings on public.yaml and vault.yaml with both Gmail SMTP and AWS SES and then run update-config but when we tried to invite web users no email is received.
Is ther any ohter file to tweak ?
After a few research i find that we have to add a line in public.yml:
EMAIL_BACKEND = ‘django.core.mail.backends.console.EmailBackend’
Does it correct ??

Thanks

You shouldn't need to change the EMAIL_BACKEND setting, commcare-cloud will set that accordingly.

At the very least, you'll need to add your SMTP authentication credentials in your secrets vault. Instructions for this vary depending on your secrets backend (ansible-vault, AWS secrets, etc), but the two secrets you need to set are EMAIL_LOGIN and EMAIL_PASSWORD. For example (your setup may look different):

# secrets.yml

localsettings_private:
  # ...
  EMAIL_LOGIN: ...  # SMTP authentication username
  EMAIL_PASSWORD: ...  # SMTP authentication password
  # ...

Also ensure that the SMTP configurations in your public.yml are correct for your email server. Mainly:

# public.yml

localsettings:
  # ...
  EMAIL_SMTP_HOST: ...
  EMAIL_SMTP_PORT: ...
  EMAIL_USE_TLS: yes  # or no, depending on your SMTP setup
  # ...

There are also several email addresses that CommCare HQ will use when composing emails. This is not required, but when configuring real email settings, you probably want to change these. The most meaningful are probably:

# public.yml
server_email: noreply@example.com
default_from_email: noreply@example.com
support_email: support@example.com
contact_email: info@example.com

You can see the full list of available email address settings (at the time of this writing) here.