Defect #2916 ยป ignore-emails-without-from-header.diff
app/models/mail_handler.rb (working copy) | ||
---|---|---|
40 | 40 |
# Processes incoming emails |
41 | 41 |
def receive(email) |
42 | 42 |
@email = email |
43 |
@user = User.active.find_by_mail(email.from.first.to_s.strip) |
|
43 |
@user = User.active.find_by_mail(email.from.first.to_s.strip) unless email.from.nil?
|
|
44 | 44 |
unless @user |
45 | 45 |
# Unknown user => the email is ignored |
46 | 46 |
# TODO: ability to create the user's account |