Guest User

Untitled

a guest
Jan 21st, 2018
913
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. #!/usr/bin/env ruby
  2.  
  3. require 'rubygems'
  4. require 'postmark'
  5. require 'tmail'
  6. require 'readhtml.rb'
  7.  
  8. Postmark.api_key = "70b6a082-2f01-48c8-ba30-ff3e772c2845"
  9.  
  10. message = TMail::Mail.new
  11. message.from = "[email protected]"
  12. message.to = "[email protected]"
  13. #message.bcc = "[email protected]"
  14. message.subject = "test"
  15. message.content_type = "multipart/alternative"
  16. message.body = read_file("template.html")
  17. message.tag = "java"
  18. #message.postmark_attachments = [File.open("template.html")]
  19.  
  20.  
  21. # staging setup end
  22.  
  23. for i in 1..1 do
  24.  
  25. puts "Email:" + i.to_s
  26.  
  27. puts Postmark.response_parser_class.inspect
  28. p Postmark.send_through_postmark(message)
  29.  
  30. end
Add Comment
Please, Sign In to add comment