Files
danbooru/app/mailers
evazion e72073ca6b emails: update email templates.
* Add header with the Danbooru name and logo.
* Add footer with links to the site, the privacy policy, and the contact page.
* Add "You received this email because of X" messages to remind users why
  they received the email.
* Add basic CSS to make the design match the site.
2022-09-28 00:29:50 -05:00
..
2022-09-28 00:29:50 -05:00

Mailers

This directory contains mailers for sending emails. Mailers are kind of like controllers, except for generating emails instead of generating HTML.

The actual email templates live in app/views/user_mailer.

Emails are sent asynchronously using a background job. If sending the email fails, it will be retried later.

Sending emails requires a SMTP server to be configured in config/danbooru_local_config.rb. In production, Amazon SES is used to send emails.

Email templates can be previewed at http://localhost:3000/rails/mailers (assuming you're running bin/rails server on port 3000, the default).

Example

UserMailer.welcome_user(@user).deliver_later

See also

External links