From bbb825b882cedb632b9557fc82b43347175d15a0 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Sun, 25 Aug 2024 12:35:34 -0400 Subject: [PATCH] send emsil --- app/assign_action.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/app/assign_action.js b/app/assign_action.js index cc9df25..8b7c115 100644 --- a/app/assign_action.js +++ b/app/assign_action.js @@ -1,6 +1,9 @@ const db = require('../app/db') const logger = require('../app/logger'); const fs = require('fs'); +import nodemailer from "nodemailer"; + + var assign_action ={ processLinedJobs(value) { @@ -18,6 +21,32 @@ var assign_action ={ 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 👻" ', // 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: + } + main().catch(console.error); + }); console.log(" processLinedJobs ************************ : ", value);