Created
October 8, 2021 06:43
-
-
Save Peelz/5b0580cb2bc5bc8f402ae16cb6f33c83 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require("https").globalAgent.options.ca = | |
require("ssl-root-cas/latest").create(); | |
const mailer = require("nodemailer"); | |
const MAILER_HOST = ""; | |
const MAILER_SECURE = true; | |
const MAILER_PORT = 465; | |
const MAILER_AUTH_USER = ""; | |
const MAILER_AUTH_PASS = ""; | |
let transporter = mailer.createTransport({ | |
host: MAILER_HOST, | |
port: MAILER_PORT, | |
secure: MAILER_SECURE, // true for 465, false for other ports | |
auth: { | |
user: MAILER_AUTH_USER, // generated ethereal user | |
pass: MAILER_AUTH_PASS, // generated ethereal password | |
}, | |
}); | |
const mailOptions = { | |
from: `Sender <>`, | |
to: "Reciever <>", | |
subject: "Hello", | |
text: "some text here to", | |
greetingTimeout: 10, | |
}; | |
transporter.sendMail(mailOptions); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment