Advertisement
Guest User

Untitled

a guest
Oct 26th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. require "mail"
  2.  
  3. mail = Mail.new do
  4. to 'nicolas@test.lindsaar.net.au'
  5. from 'Mikel Lindsaar <mikel@test.lindsaar.net.au>'
  6. subject 'First multipart email sent with Mail'
  7.  
  8. text_part do
  9. body 'Find my source code attached'
  10. end
  11.  
  12. html_part do
  13. content_type 'text/html; charset=UTF-8'
  14. body 'Find my <b>source code</b> attached'
  15. end
  16. end
  17.  
  18. mail.add_file(__FILE__)
  19.  
  20. puts mail.to_s
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement