Skip to content

Instantly share code, notes, and snippets.

@rlmattax
Created January 17, 2012 20:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rlmattax/1628746 to your computer and use it in GitHub Desktop.
Save rlmattax/1628746 to your computer and use it in GitHub Desktop.
class BadUsernameMailer < ActionMailer::Base
layout 'mailer'
default from: "info@uflavor.com"
def username_changed_email(user,old,new)
@old = old
@new = new
mail(:to => user.email, :subject => "uFlavor - Important Account Information - username changed")
end
end
@davidray
Copy link

From the rails guides...

class UserMailer < ActionMailer::Base
def welcome_email(user)
mail(:to => user.email) do |format|
format.html { render :layout => 'my_layout' }
format.text
end
end
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment