Defect #2916 ยป ignore-emails-without-from-header.diff
| app/models/mail_handler.rb (working copy) | ||
|---|---|---|
|
# 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.first.to_s.strip) unless email.from.nil?
|
||
|
unless @user
|
||
|
# Unknown user => the email is ignored
|
||
|
# TODO: ability to create the user's account
|
||