mirror of
https://github.com/redmine/redmine.git
synced 2024-09-09 22:25:56 +02:00
Makes email address case-insensitive in MailHandler (#2032).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@1933 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
a4b07a36ed
commit
bc77cc2c5c
@ -39,7 +39,7 @@ class MailHandler < ActionMailer::Base
|
||||
# Processes incoming emails
|
||||
def receive(email)
|
||||
@email = email
|
||||
@user = User.find_active(:first, :conditions => {:mail => email.from.first})
|
||||
@user = User.find_active(:first, :conditions => ["LOWER(mail) = ?", email.from.first.to_s.strip.downcase])
|
||||
unless @user
|
||||
# Unknown user => the email is ignored
|
||||
# TODO: ability to create the user's account
|
||||
|
@ -1,9 +1,9 @@
|
||||
Return-Path: <jsmith@somenet.foo>
|
||||
Return-Path: <JSmith@somenet.foo>
|
||||
Received: from osiris ([127.0.0.1])
|
||||
by OSIRIS
|
||||
with hMailServer ; Sun, 22 Jun 2008 12:28:07 +0200
|
||||
Message-ID: <000501c8d452$a95cd7e0$0a00a8c0@osiris>
|
||||
From: "John Smith" <jsmith@somenet.foo>
|
||||
From: "John Smith" <JSmith@somenet.foo>
|
||||
To: <redmine@somenet.foo>
|
||||
Subject: New ticket on a given project
|
||||
Date: Sun, 22 Jun 2008 12:28:07 +0200
|
||||
|
Loading…
Reference in New Issue
Block a user