ignore-emails-without-from-header.diff

Patch to fix issue, one line change - Nick Hemsley, 2009-03-06 05:31

Download (559 Bytes)

View differences:

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