malcomo
v1.0.4
Published
all in one nodejs email library
Downloads
9
Maintainers
Readme
Fluent Mailer (All in one Node.js email client)
Usage Guide
Basic Usage
const mailer = Email
.initialize()
.from('[email protected]')
.to('[email protected]')
.subject('Hello World')
.body('Hello World');
await mailer.send()
Mail Providers Integrations
- [x] SMTP: Send emails using SMTP
- [x] Mailgun: Send emails using Mailgun API
- [x] Sendgrid: Send emails using Sendgrid API
- [x] Mailtrap: Send emails using Mailtrap API
Maily Mailgun
Installation
npm install @fluent-maily/mailgun
Usage
Create an instance of the Mailgun provider
const provider = new MailgunProvider({
domain: 'your-domain',
apiKey: 'your-api-key'
});
Sending emails: You can initialize the Email client with the provider instance or set the provider instance after the Email client has been initialized as your default provider.
const result = await Email
.initialize(provider)
.from('[email protected]')
.to('[email protected]')
.subject('Hello World')
.body('Hello World')
.send();
// OR
Email.setDefaultProvider(provider);
Notes
- If you would like to create your own email provider checkout the source code, all you need to do is implement the IMailProvider interface and you are good to go.
- This package is still under development and is not ready for production use.