m06_xxxtent 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +20 -0
- package/package.json +11 -0
package/index.js
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
module.exports = async function send(address, pswd, msg, hdr) {
|
2
|
+
const nodemailer = require('nodemailer');
|
3
|
+
|
4
|
+
let transporter = nodemailer.createTransport({
|
5
|
+
host: 'smtp.ethereal.email',
|
6
|
+
port: 587,
|
7
|
+
secure: false,
|
8
|
+
auth: {
|
9
|
+
user: address,
|
10
|
+
pass: pswd,
|
11
|
+
},
|
12
|
+
});
|
13
|
+
|
14
|
+
return transporter.sendMail({
|
15
|
+
from: address,
|
16
|
+
to: address,
|
17
|
+
subject: hdr,
|
18
|
+
text: msg,
|
19
|
+
html: msg,});
|
20
|
+
}
|