We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a58b6a commit a04cc0fCopy full SHA for a04cc0f
lala.js
@@ -0,0 +1,32 @@
1
+import nodemailer from "nodemailer";
2
+import "dotenv/config";
3
+
4
+const { MAIL_API_KEY, MAIL_FROM } = process.env;
5
6
+const nodemailerConfig = {
7
+ host: "smtp.ukr.net",
8
+ port: 465,
9
+ secure: true,
10
+ auth: {
11
+ user: MAIL_API_KEY,
12
+ pass: MAIL_FROM,
13
+ },
14
+};
15
16
+const transport = nodemailer.createTransport(nodemailerConfig);
17
18
+const email = {
19
+ from: MAIL_API_KEY,
20
+ to: "email address for who",
21
+ subject: "topic of the letter",
22
+ html: "<stron>Hi!</stron>",
23
24
25
+transport
26
+ .sendMail(email)
27
+ .then(() => {
28
+ console.log("Email sent!");
29
+ })
30
+ .catch((err) => {
31
+ console.log(err.message);
32
+ });
0 commit comments