docbrown/docs/backend/emails.md
Michael Kohl 6dfabd578f
Rename SiteConfig to Settings::General (#13573)
* Rename SiteConfig

* More renaming

* Update spec

* Update mandatory settings mapping

* More renaming

* e2e test fixes

* You have a rename, and you have a rename

* Spec fix

* More changes

* Temporarily disable specs

* After-merge update

* Undo rename for migration

* undo rename of DUS

* Fix DUS

* Fix merge problem

* Remove redundant DUS

* Fix specs

* Remove unused code

* Change wrong class name

* More cleanup

* Re-add missing values to constant

* Fix constant

* Fix spec

* Remove obsolete fields

* Add accidentally removed field

* Update spec

* Move methods from Settings::General to ForemInstance

* Remove unneeded model

* Change mentions of 'site config'
2021-05-21 14:45:37 +02:00

1 KiB

title
Emails

Setting up email

If you would like to enable transactional email using services like SendGrid or Mailgun, you can configure it by using the following environment variables:

SMTP_ADDRESS=         # ie. "smtp.sendgrid.net"
SMTP_PORT=            # ie. 587
SMTP_DOMAIN=
SMTP_USER_NAME=
SMTP_PASSWORD=
SMTP_AUTHENTICATION=  # defaults to :plain

We follow the standard ActionMailer configuration. For more info, please check out Rails' official documentation.

Previewing emails in development

You can view email previews at http://localhost:3000/rails/mailers.

Previews are setup in the directory spec/mailers/previews.

Overriding mailer templates

To update the contents of emails that the app sends, edit the views under app/views/mailers. Note that this app uses the devise_invitable gem for invitations. The views for this gem are stored under app/views/devise/mailer.