mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 10:06:53 +08:00
17 lines
470 B
Ruby
17 lines
470 B
Ruby
class AppMailer < Devise::Mailer
|
|
helper :application, :mailer, :input_sanitize
|
|
include Devise::Controllers::UrlHelpers
|
|
default template_path: 'users/mailer'
|
|
default from: ENV['MAIL_FROM']
|
|
default reply: ENV['MAIL_REPLYTO']
|
|
|
|
def notification(user, notification, opts = {})
|
|
@user = user
|
|
@notification = notification
|
|
headers = {
|
|
to: @user.email,
|
|
subject: I18n.t('notifications.email_title')
|
|
}.merge(opts)
|
|
mail(headers)
|
|
end
|
|
end
|