Summary
When parsing malformed MIME emails (e.g. those missing a closing boundary), the parser emits PSR-3 WARNING messages such as:
MimePart(4584, content-type=text/plain) End boundary for part not found
The documentation covers how to redirect logs to a custom logger, but does not document how to suppress them entirely. The only workaround is injecting a NullLogger, which silences all log levels — not just warnings.
Request
Provide a built-in option to control the minimum log level so recoverable parse warnings can be silenced without discarding all logs.
Context
We use this package in a Laravel application to parse inbound emails. Malformed MIME emails are a normal operational reality, so these warnings appear constantly as noise in our production monitoring.
- zbateson/mail-mime-parser: 4.0.1
- laravel/framework: 12.60.2
- PHP: 8.4
Summary
When parsing malformed MIME emails (e.g. those missing a closing boundary), the parser emits PSR-3
WARNINGmessages such as:The documentation covers how to redirect logs to a custom logger, but does not document how to suppress them entirely. The only workaround is injecting a
NullLogger, which silences all log levels — not just warnings.Request
Provide a built-in option to control the minimum log level so recoverable parse warnings can be silenced without discarding all logs.
Context
We use this package in a Laravel application to parse inbound emails. Malformed MIME emails are a normal operational reality, so these warnings appear constantly as noise in our production monitoring.