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
(async () => {
// Simply call the mail2pdf() function with the email (or
// emails as an array) you want to convert. You can also
// pass additional options, see below for details.
const pdf = await mail2pdf('email.eml', { language: 'en' });
// The resulting PDF is returned as a Buffer that you can
// save to disk for example.
await fs.writeFile('sample.pdf', pdf);
})();
`
The text was updated successfully, but these errors were encountered:
I had to make the following changes to get it to run
`
//import mail2pdf from 'mail2pdf';
//import { promises as fs } from 'fs';
const fs = require('fs.promises');
const mail2pdf = require('mail2pdf');
(async () => {
// Simply call the
mail2pdf()
function with the email (or// emails as an array) you want to convert. You can also
// pass additional options, see below for details.
const pdf = await mail2pdf('email.eml', { language: 'en' });
// The resulting PDF is returned as a
Buffer
that you can// save to disk for example.
await fs.writeFile('sample.pdf', pdf);
})();
`
The text was updated successfully, but these errors were encountered: