{"record":{"id":"aa018f38bbf57940","repo":"phacility/phabricator","slug":"err-exception","errorCode":"err:exception","errorMessage":"Ignoring email to create files that did not include attachments.","messagePattern":"Ignoring email to create files that did not include attachments\\.","errorType":"exception","errorClass":"PhabricatorMetaMTAReceivedMailProcessingException","httpStatus":null,"severity":"info","filePath":"src/applications/files/mail/FileCreateMailReceiver.php","lineNumber":17,"sourceCode":"<?php\n\nfinal class FileCreateMailReceiver\n  extends PhabricatorApplicationMailReceiver {\n\n  protected function newApplication() {\n    return new PhabricatorFilesApplication();\n  }\n\n  protected function processReceivedMail(\n    PhabricatorMetaMTAReceivedMail $mail,\n    PhutilEmailAddress $target) {\n    $author = $this->getAuthor();\n\n    $attachment_phids = $mail->getAttachments();\n    if (empty($attachment_phids)) {\n      throw new PhabricatorMetaMTAReceivedMailProcessingException(\n        MetaMTAReceivedMailStatus::STATUS_UNHANDLED_EXCEPTION,\n        pht(\n          'Ignoring email to create files that did not include attachments.'));\n    }\n    $first_phid = head($attachment_phids);\n    $mail->setRelatedPHID($first_phid);\n\n    $sender = $this->getSender();\n    if (!$sender) {\n      return;\n    }\n\n    $attachment_count = count($attachment_phids);\n    if ($attachment_count > 1) {\n      $subject = pht('You successfully uploaded %d files.', $attachment_count);\n    } else {\n      $subject = pht('You successfully uploaded a file.');\n    }","sourceCodeStart":1,"sourceCodeEnd":35,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/files/mail/FileCreateMailReceiver.php#L1-L35","documentation":"FileCreateMailReceiver handles inbound email that creates files from attachments; when PhabricatorMetaMTAReceivedMail::getAttachments() returns empty, it throws a processing exception with STATUS_UNHANDLED_EXCEPTION so the mail is marked ignored rather than processed. This is expected control flow, not a malfunction: there is nothing to turn into a file. It appears in logs with the err:exception code but is informational.","triggerScenarios":"Sending a plain-text email with no MIME attachments to the files application's inbound address; mail where all content is inline text; a mail gateway stripping MIME parts before delivery to Phabricator.","commonSituations":"Users replying to notification threads (no attachments) at the file-create address; corporate mail gateways removing attachments; admins testing the address with an empty message.","solutions":["Send mail that actually contains file attachments (multipart MIME) to the files receive address","If testing, attach any file before sending","If attachments were included but ignored, verify the inbound mail pipeline (mail adapter, parsing) preserves MIME parts"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// In a custom receiver subclass, decide how to treat attachment-less mail\n// instead of relying on the default ignore-and-throw:\nprotected function processReceivedMail($mail, $target) {\n  if (!$mail->getAttachments()) {\n    // Log/notify the sender, then return to skip file creation cleanly.\n    return;\n  }\n  // ...\n}","typeGuard":null,"tryCatchPattern":"try {\n  // invoke receiver processing\n} catch (PhabricatorMetaMTAReceivedMailProcessingException $ex) {\n  // Mail is marked with the status code and ignored; safe to log and continue.\n}","preventionTips":["Tell users the file-create address only processes mail that carries attachments","Verify corporate mail gateways forward MIME parts untouched to the inbound address","Treat recurring occurrences of this status as a routing problem, not an application error"],"tags":["email","mail","files","phabricator"],"backgroundTag":"email-without-attachments","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}