Skip to content

Instantly share code, notes, and snippets.

@pepe
Created August 12, 2010 14:41
Show Gist options
  • Save pepe/521075 to your computer and use it in GitHub Desktop.
Save pepe/521075 to your computer and use it in GitHub Desktop.
(rdb:1) p message = registered_mailers[mailer_name].messages[message_name].call(*attributes)
#<Mail::Message:2183856880, Multipart: false, Headers: <From: orders@me-tee.eu>, <To: e@co.cz>, <Subject: translation missing: en, notification, new_order, subject>, <Content-Type: text/html>>
(rdb:1) p Mail::TestMailer.deliveries
[]
(rdb:1) e message.deliver
#<Mail::Message:2183856880, Multipart: false, Headers: <Date: Thu, 12 Aug 2010 16:39:14 +0200>, <From: orders@me-tee.eu>, <To: e@co.cz>, <Message-ID: <4c640792608b9_13659800e092c934b2@LongJingXiHu.local.mail>>, <Subject: translation missing: en, notification, new_order, subject>, <Mime-Version: 1.0>, <Content-Type: text/html>, <Content-Transfer-Encoding: 7bit>>
(rdb:1) p Mail::TestMailer.deliveries
[]
(rdb:1) p Mail.deliver {from 'ec@de.cz'}
#<Mail::Message:2183006440, Multipart: false, Headers: <Date: Thu, 12 Aug 2010 16:41:09 +0200>, <From: ec@de.cz>, <Message-ID: <4c640805ab8dd_13659800e092c9351@LongJingXiHu.local.mail>>, <Mime-Version: 1.0>, <Content-Type: text/plain>, <Content-Transfer-Encoding: 7bit>>
(rdb:1) p Mail::TestMailer.deliveries
[#<Mail::Message:2183006440, Multipart: false, Headers: <Date: Thu, 12 Aug 2010 16:41:09 +0200>, <From: ec@de.cz>, <Message-ID: <4c640805ab8dd_13659800e092c9351@LongJingXiHu.local.mail>>, <Mime-Version: 1.0>, <Content-Type: text/plain>, <Content-Transfer-Encoding: 7bit>>]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment