@dynejs/mail
v0.1.4
Published
A simple mail on top of nodemailer with css extracting.
Downloads
2
Readme
Dyne Mail
A simple mail on top of nodemailer with css extracting.
Usage:
const { Mailer, nodeMailer } = require('@dynejs/mail')
const mailer = new Mailer({
url: 'http://localhost',
host: 'smpt.mailtrap.io',
port: '2525',
user: 'user',
pass: 'password',
secure: false,
driver: nodeMailer
})
await mailer.send({
to: '[email protected]',
from: '[email protected]',
subject: 'Test email',
content: `
<style>
.wrapper {
padding: 20px;
}
</style>
<div class="wrapper">Content</div>
`
})
The css classes will be transformed into styles on the content property:
<div class="wrapper" style="padding: 20px;">Content</div>