mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-14 05:05:55 +08:00
15 lines
No EOL
485 B
Ruby
15 lines
No EOL
485 B
Ruby
class AppMailer < Devise::Mailer
|
|
helper :application
|
|
include Devise::Controllers::UrlHelpers
|
|
default template_path: 'users/mailer'
|
|
default from: ENV["MAIL_FROM"]
|
|
default reply: ENV["MAIL_REPLYTO"]
|
|
|
|
def invitation_to_organization(user, added_by, organization, opts = {})
|
|
@user = user
|
|
@added_by = added_by
|
|
@org = organization
|
|
headers = { to: @user.email, subject: (I18n.t('mailer.invitation_to_organization.subject')) }.merge(opts)
|
|
mail(headers)
|
|
end
|
|
end |