Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/navjotdhanawat/dynamic-mailer
Dynamic mailer is used to send mail with dynamic template of handlebar
https://github.com/navjotdhanawat/dynamic-mailer
email email-template handlebars handlebars-template mail nodemailer send template
Last synced: 9 days ago
JSON representation
Dynamic mailer is used to send mail with dynamic template of handlebar
- Host: GitHub
- URL: https://github.com/navjotdhanawat/dynamic-mailer
- Owner: navjotdhanawat
- License: mit
- Created: 2017-05-11T08:56:40.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-08T05:13:49.000Z (over 7 years ago)
- Last Synced: 2024-11-24T10:28:43.350Z (2 months ago)
- Topics: email, email-template, handlebars, handlebars-template, mail, nodemailer, send, template
- Language: JavaScript
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# How to Setup: Dynamic Mailer for sending mail with customized template using handlebar, nodejs, express.
```
npm install dynamic-mailer --save```
Steps:
1. Include package 'dynamic-mailer'
2. Create credentials and data object as below.
3. content, header and footer of template should be in 'td' tag.
4. Just call mailer() function.```javascript
var mailer = require("dynamic-mailer").sendEmail;
var credentials = {
from: "[email protected]",
host: "smtp.server.net",
secureConnection: true,
port: 465,
transportMethod: "SMTP",
auth: {
user: "[email protected]",
pass: "**********"
}
};
var data = {
from: '[email protected]',
to : '[email protected]',
subject: 'Mail Subject',
content: 'Its Google',
header: ' Its Header ',
footer: ' Xxxx xxxx xxxx xxxxx Its footer',
credentials: credentials
}mailer(data, function(err, data){
console.log(data);
console.log(err);
});```
## Please let us know if any bug. [Link](https://github.com/navjotdhanawat/dynamic-mailer/issues)