GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — JS-Logging/mailer.js at main · ConniBug/JS-Logging

Expand file tree

/

mailer.js

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
41 lines (37 loc) · 893 Bytes
/

mailer.js

Copy path

File metadata and controls

41 lines (37 loc) · 893 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
const { getDateTime } = require("./Utils");
var nodemailer = require("nodemailer");
var transporter;
let sender = "";
let send_to = "";
module.exports.setupMail = async (host_t, port_t, email_t, email_pass_t, send_to_t) => {
sender = email_t;
send_to = send_to_t;
transporter = nodemailer.createTransport({
host: host_t,
port: port_t,
secure: true,
auth: {
user: email_t,
pass: email_pass_t,
},
});
return true;
}
module.exports.sendMail = async (message, subject = "ConniBug/JS-Logging") => {
let dat = {
from: sender,
to: send_to,
subject: `${subject}`,
html: `
Time: ${getDateTime()}
<br>
<br>
<div>
${message}
</div>
`,
};
let info = await transporter.sendMail(dat);
console.log("Message sent: %s", info.messageId);
console.log("Preview URL: %s", nodemailer.getTestMessageUrl(info));
};
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.