![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@abhishekdeb/ezmailer
Advanced tools
Out of the box Email wrapper for popular nodejs email systems
Out of the box Email wrapper for popular nodejs email systems ( NodeMailer, Sendgrid, MailGun)
ezMailer is an out-of-the-box email system wrapper for node JS ecosystem. The Main principle behind ezMailer is to abstract the nuances of maintaining an (or more) email system(s) from the developer.
Oh, and it has full blown templating support as well! Yay!
npm: npm i @abhishekdeb/ezmailer --save
yarn: yarn add @abhishekdeb/ezmailer
ezMailer has fairly minimalistic config, which stays same for any email system you work with.
// config.mail.js
'use strict';
module.exports = {
templatePath: './',
services: {
nodemailer: {
provider: 'Gmail', //yahoo, etc.
user: '[Username]@gmail.com',
pass: '[Your_Password]'
},
sendgrid: '[Your_SendGrid_Key]',
mailgun: {
apiKey: '[Your_Mailgun_key]',
domain: '[Your_website_domain]'
}
}
};
You will feed this config to initialization of ezmailer on startup.
// app.js (or any entry point of the app)
let config = require('./config.mail.js'); // the above configuration
//Load ezmailer with the config's email section that corresponds to ezmailer
let ezmailer = require('ezmailer');
ezmailer.use(config, 'nodemailer'); //nodemailer / sendgrid / mailgun
ezMailer needs a config file which will contain your smtp credentials for NodeMailer, sendgrid, etc...
Please use a config file like above.
// config.mail.js
'use strict';
module.exports = {
templatePath: './',
mailer: {
service: 'Gmail',
user: 'sample.user@gmail.com',
pass: 'sample.password'
}
};
//app.js
'use strict';
let ezmailer = require('ezmailer');
ezmailer.use(require('./config.mail'), 'nodemailer');
//service.sample.js
let mailOptions = {
from: 'from@gmail.com',
to: 'to@gmail.com',
subject: 'Sample Basic ezmailer test',
body: {
text: 'This is basic ezmailer test. ',
html: '<h1>This is <u>Basic</u> <b><i>ez</i>Mailer<b> test.'
}
};
//Send the mail. sendMail returns a promise.
ezmailer.sendMail(mailOptions).then(
data => {
console.log('Email has been sent : ', data);
},
err => {
console.log('Email could not be sent : ', err);
}
);
For more examples and usage, please refer to the (Wiki)wiki.
The source is pretty simple. The main index.js file is responsible for service discovery and selection. The Services are defined in 'services' directory. If you need to add a new email provider like nodemailer or sendgrid, create a new folder inside services and it will be automatically registered.
To get started with extensions, copy paste an existing service and edit through it.
NOTES
Usage
Services/customProvider
index.js
to first read the config file and then eventually send same reply.Abhishek Deb – @vikz91 – vikz91.deb@gmail.com
Distributed under the MIT license. See LICENSE
for more information.
git checkout -b feature/fooBar
)git commit -am 'Add some fooBar'
)git push origin feature/fooBar
)FAQs
Out of the box Email wrapper for popular nodejs email systems
The npm package @abhishekdeb/ezmailer receives a total of 5 weekly downloads. As such, @abhishekdeb/ezmailer popularity was classified as not popular.
We found that @abhishekdeb/ezmailer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.