Skip to content

No way to suppress internal MIME parse warnings without injecting a custom logger #267

Description

@dasundev

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions