Class: Incoming::Strategies::Postmark
- Inherits:
-
Object
- Object
- Incoming::Strategies::Postmark
- Includes:
- Incoming::Strategy
- Defined in:
- lib/incoming/strategies/postmark.rb
Instance Attribute Summary
Attributes included from Incoming::Strategy
Instance Method Summary collapse
-
#initialize(request) ⇒ Postmark
constructor
A new instance of Postmark.
Methods included from Incoming::Strategy
Constructor Details
#initialize(request) ⇒ Postmark
Returns a new instance of Postmark.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/incoming/strategies/postmark.rb', line 9 def initialize(request) email = ::Postmark::Mitt.new(request.body.read) = email. = Mail.new do headers email.headers from email.from to email.to reply_to email.reply_to subject email.subject body email.text_body html_part do content_type 'text/html; charset=UTF-8' body email.html_body end if email.html_body email..each do |a| add_file :filename => a.file_name, :content => Base64.decode64(a.source['Content']) end end end |