summaryrefslogtreecommitdiffstats
path: root/app/models/mail_handler.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-03-06 18:25:19 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-03-06 18:25:19 +0000
commit009b685b1d64c0cbb6cf8c78dfd65ecc0b004d9a (patch)
treed7544ee2184170d91933d6a1e8535558061f3302 /app/models/mail_handler.rb
parent02ecc8aa15c01ade9c4e511fc5264b3948af9d24 (diff)
downloadredmine-009b685b1d64c0cbb6cf8c78dfd65ecc0b004d9a.tar.gz
redmine-009b685b1d64c0cbb6cf8c78dfd65ecc0b004d9a.zip
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
Diffstat (limited to 'app/models/mail_handler.rb')
-rw-r--r--app/models/mail_handler.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb
index 9836a4a7e..9b6410d57 100644
--- a/app/models/mail_handler.rb
+++ b/app/models/mail_handler.rb
@@ -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