lib/ahoy_email/processor.rb in ahoy_email-0.1.2 vs lib/ahoy_email/processor.rb in ahoy_email-0.1.3

- old
+ new

@@ -11,17 +11,19 @@ def process if options[:message] @ahoy_message = AhoyEmail.message_model.new ahoy_message.token = generate_token + ahoy_message.to = message.to.join(", ") if ahoy_message.respond_to?(:to=) ahoy_message.user = options[:user] track_open if options[:open] track_links if options[:utm_params] or options[:click] - # save + ahoy_message.mailer = options[:mailer] if ahoy_message.respond_to?(:mailer=) ahoy_message.subject = message.subject if ahoy_message.respond_to?(:subject=) ahoy_message.content = message.to_s if ahoy_message.respond_to?(:content=) + ahoy_message.save message["Ahoy-Message-Id"] = ahoy_message.id end rescue => e report_error(e) \ No newline at end of file