You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

25 lines
407 B

var mail = (url) => {
var o = {
send: (to, subject, body, from) => send(to, subject, body, from)
};
const request = require('request');
var send = (to, subject, body, from) => {
return new Promise((resolve, reject) => {
request(url + `?to=${to}&subject=${subject}&body=${body}&from=${from}`, (err, res, body) => {
resolve(body);
});
});
};
return o;
}
module.exports = mail;