Closed seanfmark closed 6 years ago
Hey I am not an authority on the subject, but this looks like what you want:
The "From" header is a message header (as opposed to an SMTP envelope header). The HTML is usually embedded in a child of a multipart/alternative
MIME body part.
Looks like you would use the transaction
object to modify both the header and the body, perhaps in a plugin. Check out these functions:
transaction.set_banner(text, html)
- append html to the bottomtransaction.add_body_filter(ct_match, filter)
- arbitrarily filter body contenttransaction.header
transaction.remove_header(key)
transaction.add_header(key, value)
Fortunately this has some MIME parsing built-in, though you have to set transaction.parse_body = true
, and your filter must return the text in the same encoding.
Previously I achieved this functionality with Postfix filters + AlterMIME.
I don’t even think that’s what this question was about: I think it was basically about how to make a HTML email. There’s some good info in the nodemailer documentation about that. But it’s unrelated to Haraka.
Closing.
On Jul 6, 2018, at 5:25 PM, Wes Roberts notifications@github.com wrote:
Hey I am not an authority on the subject, but this looks like what you want:
The "From" header is a message header (as opposed to an SMTP envelope header). The HTML is usually embedded in a child of a multipart/alternative MIME body part.
Looks like you would use the transaction object to modify both the header and the body, perhaps in a plugin. Check out these functions:
transaction.set_banner(text, html) - append html to the bottom transaction.add_body_filter(ct_match, filter) - arbitrarily filter body content transaction.header transaction.remove_header(key) transaction.add_header(key, value) Fortunately this has some MIME parsing built-in, though you have to set transaction.parse_body = true, and your filter must return the text in the same encoding.
Previously I achieved this functionality with Postfix filters + AlterMIME.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Ah, I saw the title:
How to use html and change header from name
and this section of the OP:
And How to change the Header from name ?
Which I assumed meant he wanted to alter existing MIME headers/body.
Hi! I'm newbie on node.js using Haraka, Today i've success Install Haraka on my Centos 7 Server. Now i want to ask how i can using html as Subject Body Email ? And How to change the Header from name ? like Picture on below
Header Name
Html Body Text
Thank you!