markbates (owner)

Revisions

gist: 2712 Download_button fork
public
Public Clone URL: git://gist.github.com/2712.git
Text
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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