Added ability to extract text and html from multipart messages#157
Conversation
|
|
||
| > For accessibility purposes, you should *always* provide both a text and HTML version of your mails. | ||
|
|
||
| ### `multipart/alternative` emails with attachments |
There was a problem hiding this comment.
I've raised a PR against laminas/laminas-mail to fix what I think are issues with their documentation. If that's merged this section may not be needed.
There was a problem hiding this comment.
@kynx It seems they are merging your work :). So .. what do you think makes most sense here? Drop this PR, or merge it neverthless?
There was a problem hiding this comment.
This PR is still required so the text and html can be extracted from the multipart/alternative part. But I'll just link to the laminas docs for a (now correct) example of how to create the email in the first place.
|
Thanks @kynx. I've published pre-release v4.7.0-alpha. Can you test it out, and let me know if it works? I'll do the same on my end! And I'll publish a new release in a weeks time. |
I'm moving an application that uses vanilla
laminas-mailto this library. It composes email messages with text, html and attachment parts pretty-much exactly as described in https://docs.laminas.dev/laminas-mail/message/attachments/#multipartalternative-emails-with-attachments, with amultipart/alternativepart containing the text and html, followed by one or more parts for the attachments.Currently this library doesn't look inside the
multipart/alternativepart, so never finds the text and html. This PR fixes that.