diff options
Diffstat (limited to 'actionmailer/lib')
-rw-r--r-- | actionmailer/lib/action_mailer/base.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index ab17874fd8..8661f44702 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -114,7 +114,7 @@ module ActionMailer #:nodoc: rescue Object => e raise e if raise_delivery_errors end - end + end end def mail(to, subject, body, from, timestamp = nil, headers = {}, @@ -150,6 +150,11 @@ module ActionMailer #:nodoc: "=?#{charset}?Q?#{text}?=" end + def receive(raw_email) + logger.info "Received mail:\n #{raw_email}" unless logger.nil? + new.receive(TMail::Mail.parse(raw_email)) + end + private def perform_delivery_smtp(mail) Net::SMTP.start(server_settings[:address], server_settings[:port], server_settings[:domain], |