Closed egmen closed 4 years ago
In the web world, headers prefixed with X
are custom headers. That's why the library doesn't support it out of the box. But if you want to generate an EML file with that header, you should add it to your data headers.
For example:
const data = {
headers: {
'X-Unsent': '1'
},
from: this.from,
to: this.to,
subject: this.subject,
html: `<html>${this.message}</html>`
};
emlformat.build(data, function(error, eml) { ... });
@fvilers thanks for providing the answers.
That is correct, each EML header is provided in the headers
property while the standard and most used properties like from
, to
, subject
are provided directly in the data object.
I need tag X-Unsent: 1 in resulted eml file to edit email after opening in Outlook. Now I add it manually. Somebody can add this to module.