Sha256: 5233003a04f86570eaedf4dc3a958a9d4d197193852953b5a78c7e22f8da5b8c
Contents?: true
Size: 797 Bytes
Versions: 17
Compression:
Stored size: 797 Bytes
Contents
module PandaCms class FormMailer < PandaCms::ApplicationMailer def notification_email(form:, form_submission:) # TODO: Handle fields named just "name", and "email" better @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("james@otaina.co.uk", "James Inman"), from: email_address_with_name("noreply@pandacms.io", "Panda CMS"), reply_to: email_address_with_name(@sender_email, @sender_name), track_opens: "true", message_stream: "outbound" ) end end end
Version data entries
17 entries across 17 versions & 1 rubygems