Hugo Peixoto
9058ed98f7
Instead of sending all the payment details by email, we're now sending only a link to a page on this platform. This is to help reduce questions of whether the emails are from scammers or real.
39 lines
780 B
Ruby
39 lines
780 B
Ruby
class NotificationMailer < ApplicationMailer
|
|
before_action :set_notification
|
|
|
|
# Subject can be set in your I18n file at config/locales/en.yml
|
|
# with the following lookup:
|
|
#
|
|
# en.notification_mailer.expiration_in_60d.subject
|
|
#
|
|
def expiration_in_60d
|
|
mail to: @notification.member.email
|
|
end
|
|
|
|
def expiration_in_30d
|
|
mail to: @notification.member.email
|
|
end
|
|
|
|
def expired
|
|
mail to: @notification.member.email
|
|
end
|
|
|
|
def expired_30d_ago
|
|
mail to: @notification.member.email
|
|
end
|
|
|
|
def expired_60d_ago
|
|
mail to: @notification.member.email
|
|
end
|
|
|
|
def cancelled
|
|
mail to: @notification.member.email
|
|
end
|
|
|
|
private
|
|
def set_notification
|
|
@notification = params[:notification]
|
|
@payment = @notification.member.create_payment
|
|
end
|
|
end
|