You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to convert text-only emails to HTML. These emails are Content-Type: multipart/mixed, and text comes as Content-Type: text/plain in the child. I would like to be able to change to Content-Type: text/html, and modify body with add_body_filter.
As far as I can see, hook_data provides me with ability to see the content type in the child, but not change it. In the hook_data_post it is too late.
Describe the solution you'd like
Would it be possible to provide in hook_data a callback with parameters like function (ct, enc, buff, headers) (where headers are the ones from the child, not from the email headers, which is transaction.body.header.get gives), so I can manipulate the headers I need and have them propagated to the child correctly?
Describe alternatives you've considered
So far, I am at a loss about how to do this.
I am trying to convert text-only emails to HTML. These emails are Content-Type: multipart/mixed, and text comes as Content-Type: text/plain in the child. I would like to be able to change to Content-Type: text/html, and modify body with add_body_filter.
As far as I can see, hook_data provides me with ability to see the content type in the child, but not change it. In the hook_data_post it is too late.
Describe the solution you'd like
Would it be possible to provide in hook_data a callback with parameters like function (ct, enc, buff, headers) (where headers are the ones from the child, not from the email headers, which is transaction.body.header.get gives), so I can manipulate the headers I need and have them propagated to the child correctly?
Describe alternatives you've considered
So far, I am at a loss about how to do this.
Additional context
Email such as:
-> X-Mailer: swaks v20201014.0 jetmore.org/john/code/swaks/
-> MIME-Version: 1.0
-> Content-Type: multipart/mixed; boundary="----=_MIME_BOUNDARY_000_8111"
->
-> ------=_MIME_BOUNDARY_000_8111
-> Content-Type: text/plain
->
-> aaa
->
-> ------=_MIME_BOUNDARY_000_8111--
->
The text was updated successfully, but these errors were encountered: