Fixed: MailHandler raises an error when processing an email without From header (#2916).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2553 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -40,7 +40,7 @@ class MailHandler < ActionMailer::Base
|
||||
# Processes incoming emails
|
||||
def receive(email)
|
||||
@email = email
|
||||
@user = User.active.find_by_mail(email.from.first.to_s.strip)
|
||||
@user = User.active.find_by_mail(email.from.to_a.first.to_s.strip)
|
||||
unless @user
|
||||
# Unknown user => the email is ignored
|
||||
# TODO: ability to create the user's account
|
||||
|
||||
Reference in New Issue
Block a user