Generic Email
Email envelope with formatter for MailJet (I hope I'll have an opportunity to introduce more).
Entire package contains three parts:
EmailEnvelope
which is a 'glue' class of them allEmailAttachment
which is used as generic attachment classEmailAddress
which is a simple wrapper to email address and name
For more examples have a look into unit tests directory
Examples
Simplest example
const email = ; SomeEmailSendingSystem;
MailJet formatter
There is availabe MailJet formatter, which has to be given as a parameter to email
object:
email;
All formatters are available as an enum in EmailEnvelope.FORMATTERS
.
To check all features, copy-paste below example:
const email = ; const mailjet = ; const request = mailjet ;
Reason of existence of this project
This entire project was made just to practice TDD in JavaScript. Additional goal was to write as readable code as possible (I know it's not perfect, but it was only a side-quest).