The "to:" header isn't mandatory in imap and some clients doesn't include it or maybe the user sends a message with a bcc header. If the message has no "to" header, helpdesk raises an ERROR:
ERROR -- : MailHandler: an unexpected error occurred when receiving email: undefined methodformatted' for nil:NilClass
It creates an issue but incomplete: without the owner-email header i.e.
You can test it with a fixture without the to header:
Return-Path: <john.doe@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 Doe" <john.doe@somenet.foo>
Subject: Ticket by unknown user
Date: Sun, 22 Jun 2008 12:28:07 +0200
MIME-Version: 1.0
Content-Type: text/plain;
format=flowed;
charset="iso-8859-1";
reply-type=original
Content-Transfer-Encoding: 7bit
This is a ticket submitted by an unknown user.
The "to:" header isn't mandatory in imap and some clients doesn't include it or maybe the user sends a message with a bcc header. If the message has no "to" header, helpdesk raises an ERROR:
ERROR -- : MailHandler: an unexpected error occurred when receiving email: undefined methodformatted' for nil:NilClass
It creates an issue but incomplete: without the owner-email header i.e.You can test it with a fixture without the to header:
I've sent a pull request for it