Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env ruby
- require 'rubygems'
- require 'postmark'
- require 'tmail'
- #require './readhtml.rb'
- Postmark.api_key = "ffabe526-053d-41d1-8489-e5eca52c1f27"
- message = TMail::Mail.new
- message.from = "igor@wildbit.com"
- message.to = "b935f619461421d03d1ebd76ec881044+hashcheck@inbound.staging.postmarkapp.com"
- #message.cc = "ibalosh+uno@gmail.com"
- #message.bcc = "ibalosh+tre@gmail.com, ibalosh+quatro@gmail.com"
- message.content_type = "text/html"
- message.body = "test send" #read_file("template.html")
- message.reply_to = "ibalosh+reply@gmail.com"
- message.subject = "check inbound"
- #message.body = read_file("svn.html")
- message.tag = "inbound"
- #message.postmark_attachments = [File.open("svn.html")]
- #message["CUSTOM-HEADER"] = "my custom header value"
- # staging setup start
- Postmark.host = "ec2-184-72-216-101.compute-1.amazonaws.com"
- #Postmark.host = "ec2-50-16-85-87.compute-1.amazonaws.com"
- #Postmark.path_prefix = "/staging/"
- # staging setup end
- for i in 1..1 do
- # begin
- #puts "message" + i.to_s + " checking it right now"
- #message.to = "ibalosh+newtest+#{i.to_s}@gmail.com"
- #message.subject = "once more new something checking send " + i.to_s + "test from api slave to live"
- #message.body = "test message once more now on slave to live" + i.to_s #read_file("template.html")
- puts i
- p Postmark.send_through_postmark(message)
- # rescue Postmark::InvalidMessageError
- # puts "man"
- # end
- end
Add Comment
Please, Sign In to add comment