class Octo::ContactUs
Public Instance Methods
send_email()
click to toggle source
Send Email
after model save
# File lib/octocore/models/contactus.rb, line 19 def send_email # Send thankyou mail subject = 'Thanks for contacting us - Octo.ai' opts = { text: 'Hey we will get in touch with you shortly. Thanks :)', name: self.firstname + ' ' + self.lastname } Octo::Email.send(self.email, subject, opts) # Send mail to aron and param Octo.get_config(:email_to).each { |x| opts1 = { text: self.email + ' \n\r ' + self.typeofrequest + '\n\r' + self.message, name: x.fetch('name') } Octo::Email.send(x.fetch('email'), subject, opts1) } end