Skip to content

Commit

Permalink
Added receiver method for incoming email
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@940 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Mar 20, 2005
1 parent 2afb8a8 commit 425aa50
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion actionmailer/lib/action_mailer/base.rb
Expand Up @@ -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 = {},
Expand Down Expand Up @@ -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],
Expand Down

0 comments on commit 425aa50

Please sign in to comment.