Index: app/models/mail_handler.rb =================================================================== --- app/models/mail_handler.rb (revision 1930) +++ app/models/mail_handler.rb (working copy) @@ -39,7 +39,7 @@ # Processes incoming emails def receive(email) @email = email - @user = User.find_active(:first, :conditions => {:mail => email.from.first}) + @user = User.find_active(:first, :conditions => {:mail => email.from.first.downcase}) unless @user # Unknown user => the email is ignored # TODO: ability to create the user's account Index: app/models/user.rb =================================================================== --- app/models/user.rb (revision 1930) +++ app/models/user.rb (working copy) @@ -69,6 +69,7 @@ def before_save # update hashed_password if password was set self.hashed_password = User.hash_password(self.password) if self.password + self.mail.downcase! end def self.active