Skip to content

Instantly share code, notes, and snippets.

@markbates
Created July 27, 2008 03:20
Show Gist options
  • Save markbates/2712 to your computer and use it in GitHub Desktop.
Save markbates/2712 to your computer and use it in GitHub Desktop.
class WelcomeEmail
include Mack::Mailer
end
mail = WelcomeEmail.new
mail.to = "foo@example.com"
mail.from = "me@example.com"
mail.subject = "Hello"
mail.body(:plain) = "This is my plain text body"
mail.body(:html) = "This is my <b>HTML</b> body"
mail.attach("/path/to/my/image_file.png")
mail.attach("/path/to/my/pdf_file.pdf")
mail.deliver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment