UNPKG

multiple-email-service

Version:

It's helps developer to use multiple email service from this package.

19 lines (17 loc) 378 B
const api_key = 'key-3ax6xnjp29jd6fds4gc373sgvjxteol0'; const domain = 'smtp.gmail.com'; const mailgun = require('mailgun-js')({ apiKey: api_key, domain: domain }); exports.sendEmail = async (from, to, subject, body) => { const data = { from, to, subject, text }; mailgun.messages().send(data, function (error, body) { console.log(body); }); };