send emsil
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
const db = require('../app/db')
|
const db = require('../app/db')
|
||||||
const logger = require('../app/logger');
|
const logger = require('../app/logger');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
import nodemailer from "nodemailer";
|
||||||
|
|
||||||
|
|
||||||
var assign_action ={
|
var assign_action ={
|
||||||
|
|
||||||
processLinedJobs(value) {
|
processLinedJobs(value) {
|
||||||
@@ -18,6 +21,32 @@ var assign_action ={
|
|||||||
console.log(data);
|
console.log(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const transporter = nodemailer.createTransport({
|
||||||
|
service: "gmail",
|
||||||
|
host: "smtp.gmail.com",
|
||||||
|
port: 587,
|
||||||
|
secure: false,
|
||||||
|
auth: {
|
||||||
|
user: "message@chiefsoft.com",
|
||||||
|
pass: "may12002!",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
// send mail with defined transport object
|
||||||
|
const info = await transporter.sendMail({
|
||||||
|
from: '"Support ChiefSoft 👻" <message@chiefsoft.com>', // sender address
|
||||||
|
to: "ameye@chiefsoft.com", // list of receivers
|
||||||
|
bcc: "ses66181@gmail.com", // list of receivers
|
||||||
|
subject: "Something good ✔", // Subject line
|
||||||
|
text: "To Tester name", // plain text body
|
||||||
|
html: data, // html body
|
||||||
|
});
|
||||||
|
console.log("Message sent: %s", info.messageId);
|
||||||
|
// Message sent: <d786aa62-4e0a-070a-47ed-0b0666549519@ethereal.email>
|
||||||
|
}
|
||||||
|
main().catch(console.error);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(" processLinedJobs ************************ : ", value);
|
console.log(" processLinedJobs ************************ : ", value);
|
||||||
|
|||||||
Reference in New Issue
Block a user