Skip to content
Browse files

Added receiver method for incoming email

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@940 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 2afb8a8 commit 425aa50a902658d04037b6dd45fa81ecb478fefb @dhh dhh committed
Showing with 6 additions and 1 deletion.
  1. +6 −1 actionmailer/lib/action_mailer/base.rb
View
7 actionmailer/lib/action_mailer/base.rb
@@ -114,7 +114,7 @@ def method_missing(method_symbol, *parameters)#: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 @@ def quoted_printable(text, charset)#: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],

0 comments on commit 425aa50

Please sign in to comment.
Something went wrong with that request. Please try again.