diff --git a/scripts/mail/mail_handler.php b/scripts/mail/mail_handler.php index 2b49c910bb..deb0e2bffe 100755 --- a/scripts/mail/mail_handler.php +++ b/scripts/mail/mail_handler.php @@ -60,7 +60,15 @@ foreach ($parser->getAttachments() as $attachment) { )); $attachments[] = $file->getPHID(); } -$received->setAttachments($attachments); -$received->save(); -$received->processReceivedMail(); +try { + $received->setAttachments($attachments); + $received->save(); + $received->processReceivedMail(); +} catch (Exception $e) { + $received + ->setMessage('EXCEPTION: '.$e->getMessage()) + ->save(); +} + +