3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# File 'app/mailers/panda_cms/form_mailer.rb', line 3
def notification_email(form:, form_submission:)
@submission_data = form_submission.data
@sender_name = @submission_data["first_name"].to_s + " " + @submission_data["last_name"].to_s
@sender_email = @submission_data["email"].to_s
mail(
subject: "#{form.name}: #{form_submission.created_at.strftime("%d %b %Y %H:%M")}",
to: email_address_with_name("[email protected]", "James Inman"),
from: email_address_with_name("[email protected]", "Panda CMS"),
reply_to: email_address_with_name(@sender_email, @sender_name),
track_opens: "true",
message_stream: "outbound"
)
end
|