Closed mvnaz closed 6 years ago
@mvnaz --
You could extend ZBateson\MailMimeParser\Message\MessageParser, and provide your own Message in the constructor, simply calling parent::__construct with your Message. You could then call $messageParser->parse() directly.
I wouldn't recommend doing that for one reason though. In the next version of MMP the dependencies in MessageParser are different, so I think your current approach will probably be more backwards-compatible.
Hi, when I parse email I get big and complicated Message object. But can I use my own class for Message object ? For now I parse email, get big Message object, then create my object and get necessary data from big Message object. As I see in the method where Message is coming, the dependency there set strictly on Message class, not with interface. But may be exists some another way ?