Skip to content

Instantly share code, notes, and snippets.

@amerine
Created August 7, 2010 23:45
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 amerine/513334 to your computer and use it in GitHub Desktop.
Save amerine/513334 to your computer and use it in GitHub Desktop.
def signup
user = User.new(blah blah blah)
begin
UserMailer.email_confirmation(user).deliver
rescue Exception => e
handle error
end
end
class UserMailer < ActionMailer::Base
# Send the email_confirmation link to the user's address
def email_confirmation(user)
@user = user
mail :to => @user.email, :subject => "Hello #{@user.name}" do |format|
format.text { render :text => "TESTING: Hello #{@user.name}" }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment