url-mailer
v0.0.3
Published
parse a smtp url and create a mailer object
Downloads
4
Readme
url-mailer
Create a mail client with standard url to a smtp server. So the url of mail client is the only configuration option you need to keep.
ES6
import MailClient from 'url-mailer';
const mailUrl = 'smtp://user:[email protected]:465';
const mailer = new MailClient(mailUrl, {});
const mailOptions = {
from: 'Bob Sanders <[email protected]>',
to: '[email protected]',
subject: 'Hey Alice',
content: '<b>Important:</b> Check <a href="http://foobar.com"> this </a>'
}
mailer.sendEmail(mailOptions).then(() => {
console.log('successful!')
});