Hello,
Thank you for your message.
Based on the error returned by the mail service:
Code: 422
Message: Unprocessable Entity
Body: {“ErrorCode”:300,”Message”:”Zero-sized attachments not allowed.”}
we can confirm that the email was rejected because an attachment in the outgoing message had a file size of 0 bytes.
At this stage, we cannot yet confirm which part of the process is generating or passing that empty attachment. To determine the exact cause, we would need some additional debugging on the site.
Could you please enable WordPress debugging and reproduce the issue if possible? The most useful next step would be to capture any PHP warnings/errors and mail-related logs at the time the voucher email fails.
If available, it would also help to check:
- the plugin/mail logs around the failed send attempt
- whether a PDF file was generated for that order
- the size of the generated file, if one exists
Once we have the debug output, we can review it further and identify where the empty attachment is coming from.
Kind regards,
Thread Starter
jtg
(@favdes)
Hello,
Thank you for coming back to me. Here is an extra from the error log when the order was made:
[05-Jun-2026 01:55:27 UTC] PHP Warning: Undefined property: stdClass::$plugin in /home/ripleysgcco/public_html/wp-admin/includes/class-wp-automatic-updater.php on line 228
[05-Jun-2026 12:22:23 UTC] PHP Warning: file_get_contents(/home/ripleysgcco/public_html/wp-content/uploads/voucherpdfuploads/17806620119846836680335648-receipt.pdf): Failed to open stream: No such file or directory in /home/ripleysgcco/public_html/wp-content/plugins/post-smtp/Postman/Postman-Mail/PostmanPostmarkMailEngine.php on line 55
[05-Jun-2026 12:22:24 UTC] ERROR PostmanWpMail: Exception code=0 message=Code: 422, Message: Unprocessable Entity, Body: {“ErrorCode”:300,”Message”:”Zero-sized attachments not allowed.”}
[05-Jun-2026 12:22:44 UTC] PHP Warning: file_get_contents(/home/ripleysgcco/public_html/wp-content/uploads/voucherpdfuploads/17806620119846836680335648-receipt.pdf): Failed to open stream: No such file or directory in /home/ripleysgcco/public_html/wp-content/plugins/post-smtp/Postman/Postman-Mail/PostmanPostmarkMailEngine.php on line 55
[05-Jun-2026 12:22:44 UTC] ERROR PostmanWpMail: Exception code=0 message=Code: 422, Message: Unprocessable Entity, Body: {“ErrorCode”:300,”Message”:”Zero-sized attachments not allowed.”}
[05-Jun-2026 12:22:54 UTC] PHP Warning: file_get_contents(/home/ripleysgcco/public_html/wp-content/uploads/voucherpdfuploads/17806620119846836680335648-receipt.pdf): Failed to open stream: No such file or directory in /home/ripleysgcco/public_html/wp-content/plugins/post-smtp/Postman/Postman-Mail/PostmanPostmarkMailEngine.php on line 55
[05-Jun-2026 12:22:55 UTC] ERROR PostmanWpMail: Exception code=0 message=Code: 422, Message: Unprocessable Entity, Body: {“ErrorCode”:300,”Message”:”Zero-sized attachments not allowed.”}
[05-Jun-2026 12:23:13 UTC] PHP Warning: file_get_contents(/home/ripleysgcco/public_html/wp-content/uploads/voucherpdfuploads/17806620119846836680335648-receipt.pdf): Failed to open stream: No such file or directory in /home/ripleysgcco/public_html/wp-content/plugins/post-smtp/Postman/Postman-Mail/PostmanPostmarkMailEngine.php on line 55
[05-Jun-2026 12:23:14 UTC] ERROR PostmanWpMail: Exception code=0 message=Code: 422, Message: Unprocessable Entity, Body: {“ErrorCode”:300,”Message”:”Zero-sized attachments not allowed.”}
[05-Jun-2026 12:23:18 UTC] PHP Warning: file_get_contents(/home/ripleysgcco/public_html/wp-content/uploads/voucherpdfuploads/17806620119846836680335648-receipt.pdf): Failed to open stream: No such file or directory in /home/ripleysgcco/public_html/wp-content/plugins/post-smtp/Postman/Postman-Mail/PostmanPostmarkMailEngine.php on line 55
[05-Jun-2026 12:23:18 UTC] ERROR PostmanWpMail: Exception code=0 message=Code: 422, Message: Unprocessable Entity, Body: {“ErrorCode”:300,”Message”:”Zero-sized attachments not allowed.”}
For sending of e-mails, we use the Post SMTP plugin and the postmarkapp.com service.
Hopefully that all helps but if you need anything else, please just let me know.