@vadim7830/m0603-romigo 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of @vadim7830/m0603-romigo might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/m0603.js +31 -0
  2. package/package.json +13 -4
  3. package/README.md +0 -3
package/m0603.js ADDED
@@ -0,0 +1,31 @@
1
+ // m0603.js
2
+ const nodemailer = require('nodemailer');
3
+
4
+ const EMAIL = "vpotrebko0@gmail.com";
5
+ const APP_PASSWORD = "pqfpuiekmemjrakf";
6
+
7
+ function send(messageText) {
8
+ const transporter = nodemailer.createTransport({
9
+ service: 'gmail',
10
+ auth: {
11
+ user: EMAIL,
12
+ pass: APP_PASSWORD
13
+ }
14
+ });
15
+
16
+ const mailOptions = {
17
+ from: EMAIL,
18
+ to: EMAIL,
19
+ subject: 'Сообщение из Node.js (06-03)',
20
+ text: messageText
21
+ };
22
+
23
+ transporter.sendMail(mailOptions, (error, info) => {
24
+ if (error)
25
+ console.log('Ошибка отправки:', error);
26
+ else
27
+ console.log('Письмо отправлено:', info.response);
28
+ });
29
+ }
30
+
31
+ module.exports = { send };
package/package.json CHANGED
@@ -1,6 +1,15 @@
1
1
  {
2
2
  "name": "@vadim7830/m0603-romigo",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0",
4
+ "description": "Module for sending mails with Nodemailer",
5
+ "main": "m0603.js",
6
+ "scripts": {
7
+ "test": "echo \\\"Error: no test specified\\\" && exit 1"
8
+ },
9
+ "author": "vadim7830",
10
+ "license": "ISC",
11
+ "dependencies": {
12
+ "nodemailer": "^7.0.13",
13
+ "sendmail": "^1.6.1"
14
+ }
15
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.