Class: Integral::ContactMailer
- Inherits:
-
ActionMailer::Base
- Object
- ActionMailer::Base
- Integral::ContactMailer
- Defined in:
- app/mailers/integral/contact_mailer.rb
Overview
Handles sending auto replys to visitors and passing on enquiries
Instance Method Summary collapse
-
#auto_reply(enquiry) ⇒ Object
Send an auto reply to the visitor of the supplied enquiry.
-
#forward_enquiry(enquiry) ⇒ Object
Send supplied enquiry to contact email.
Instance Method Details
#auto_reply(enquiry) ⇒ Object
Send an auto reply to the visitor of the supplied enquiry
20 21 22 23 24 25 |
# File 'app/mailers/integral/contact_mailer.rb', line 20 def auto_reply(enquiry) @enquiry = enquiry sender = email_sender(Integral::Settings.website_title, outgoing_email_address) mail subject: auto_reply_subject(enquiry), to: enquiry.email, from: sender, reply_to: sender end |
#forward_enquiry(enquiry) ⇒ Object
Send supplied enquiry to contact email
10 11 12 13 14 15 |
# File 'app/mailers/integral/contact_mailer.rb', line 10 def forward_enquiry(enquiry) @enquiry = enquiry sender = email_sender(enquiry.name, enquiry.email) mail subject: forwarding_subject(enquiry), from: sender, to: incoming_email_address, reply_to: sender end |