Skip to content

Instantly share code, notes, and snippets.

@Phoenix23A
Created February 22, 2017 18:46
Show Gist options
  • Save Phoenix23A/4f09c856d0d39edb19da0ba72f2e342a to your computer and use it in GitHub Desktop.
Save Phoenix23A/4f09c856d0d39edb19da0ba72f2e342a to your computer and use it in GitHub Desktop.
class UserMailer < ActionMailer::Base
default from: "from@example.com"
def contact_form(email, name, message)
@message = message
mail(:from => email,
:to => 'your-email@example.com',
:subject => "A new contact form message from #{name}")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment