Guest User

Untitled

a guest
Jan 21st, 2018
910
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 = "igor@wildbit.com"
  12. message.to = "ibalosh@gmail.com"
  13. #message.cc = "ibalosh@aol.com, ibalosh@yahoo.com"
  14. #message.bcc = "ibalosh+bcc@hotmail.com"
  15. message.subject = "test"
  16. message.content_type = "multipart/alternative"
  17. message.body = read_file("template.html")
  18. message.tag = "java"
  19. #message.postmark_attachments = [File.open("template.html")]
  20.  
  21.  
  22. # staging setup end
  23.  
  24. for i in 1..1 do
  25.  
  26. puts "Email:" + i.to_s
  27.  
  28. puts Postmark.response_parser_class.inspect
  29. p Postmark.send_through_postmark(message)
  30.  
  31. end
Add Comment
Please, Sign In to add comment