Another sugestion, for GPG signed email: mime-model
If you want to modify rfc822 emails, then you can use my other module,
called MimeModel. See an example about signing an email with GPG here:
https://github.com/andris9/mime-model/blob/master/examples/openpgp-sign.js
In short, you can import a rfc822 email, modify the structure as needed,
and then export it as a rfc822 email.
Note:
Code below, for nodemailer-smime-plus allows to to send encrypted mail
and I believe I can even decrypt in AppleMail client, however there's no content inside of mail.
Using the library nodemailer-smime-plus to encrypt a message.
Another sugestion, for GPG signed email: mime-model
Note: