breakthroughmenscommunity/bmc

View on GitHub
app/mailers/contact_mailer.rb

Summary

Maintainability
A
0 mins
Test Coverage
class ContactMailer < ActionMailer::Base
  default from: "Breakthrough Men's Community <scott@breakthroughformen.org>"
  default to: "scott@breakthroughformen.org"

  def new_message(message)
    @name = message.name
    @email = message.email
    @message = message.message

    mail(to: "#{@name} <#{@email}>".html_safe,
         cc: "scott@breakthroughformen.org",
         subject: "Fwd: Contact Form")
  end
end