You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an error we starting receiving around September 12, 2018. Our Eventum implementation is configured to use our Microsoft Office 365 email service. We suspect there was some change on the Microsoft side.
We suggest that the solution is to make each Message-ID unique before sending. We wrote the code below that works for us (can be improved, I'm sure!). We hope this can be useful for the Eventum distribution. This is a problem when there is more than one recipient attached to an Eventum Issue notification list.
The error looks like this:
[2018-09-28 16:17:31] app.ERROR: 5.2.0
STOREDRV.Submission.Exception:StoragePermanentException.MapiExceptionDuplicateDelivery;
Failed to process message due to a permanent exception with message Cannot get ID from name. 16.55847:E00E0000, 17.43559:0000000083020000000000000000000000000000,
20.52176:140F8C841B0010100A00090E, 20.50032:140F8C848B1710100A001D30,
0.35180:AC010000, 255.23226:0A004967, 255.27962:02000000, 255.27962:06000000,
...
at /var/www/html/eventum/vendor/zendframework/zend-mail/src/Protocol/AbstractProtocol.php:327)"}
{"file":"/var/www/html/eventum/src/Mail/MailTransport.php","line":55,"class":"Eventum\\Mail\\MailTransport","function":"send","memory_usage":"7.25
MB","memory_peak_usage":"7.5 MB","version":"3.5.4","usr_id":""}
We discovered that if we uniquified the Message ID that we would not get the kick-back from Office 365.
This is what we did:
========================================================
/*
Add this Snippet to:
/var/www/html/eventum/src/Mail/MailMessage.php
Within the top of this function:
public static function createFromHeaderBody($headers, $content)
*/
$msgIDPart = self::GetMessageIDPart($headers);
if(!empty($msgIDPart))
{
if(strlen($msgIDPart) > 10)
{
$msgIDPartUpdate = $msgIDPart . microtime(true);
$headers = str_replace($msgIDPart, $msgIDPartUpdate, $headers);
$content = str_replace($msgIDPart, $msgIDPartUpdate, $content);
}
}
========================================================
//add this function to MailMessage.php
public static function GetMessageIDPart($header)
{
$headerString = " " . $header;
$headerString = preg_replace('/\t/', "", $headerString);
$headerString = preg_replace( '/\r|\n/', "", $headerString );
$headerString = preg_replace( '/Message-Id:/i', " Message-ID: ", $headerString );
$headerString = preg_replace( '/Message-Id: /i', " Message-ID: ", $headerString );
$headerString = preg_replace('/>/', ">\n", $headerString);
preg_match('/(?<=\Message-ID\: <)(.+)(?=\@)/i', $headerString, $matches);
$idPart = '';
if(is_array($matches))
{
if(count($matches) > 0)
{
$idPart = $matches[0];
}
}
return $idPart;
}
========================================================
The text was updated successfully, but these errors were encountered:
This is an error we starting receiving around September 12, 2018. Our Eventum implementation is configured to use our Microsoft Office 365 email service. We suspect there was some change on the Microsoft side.
We suggest that the solution is to make each Message-ID unique before sending. We wrote the code below that works for us (can be improved, I'm sure!). We hope this can be useful for the Eventum distribution. This is a problem when there is more than one recipient attached to an Eventum Issue notification list.
The error looks like this:
We discovered that if we uniquified the Message ID that we would not get the kick-back from Office 365.
This is what we did:
The text was updated successfully, but these errors were encountered: