@b2y/email-service 1.0.7 → 1.0.8

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.
package/Config.js CHANGED
@@ -8,9 +8,8 @@ const Config = {
8
8
  emailService: process.env.EMAIL_SERVICE,
9
9
  emailHost: process.env.EMAIL_HOST,
10
10
  smtpPort: process.env.SMTP_PORT,
11
- emailUser: process.env.EMAIL_USERNAME,
12
- emailPass: process.env.EMAIL_PASSWORD,
13
11
  fromEmail: process.env.FROM_EMAIL,
12
+ fromEmailPass: process.env.FROM_EMAIL_PASSWORD,
14
13
 
15
14
  // SendGrid Configuration
16
15
  sendGridApiKey: process.env.SENDGRID_API_KEY,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@b2y/email-service",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "main": "index.js",
5
5
  "exports": {
6
6
  ".": "./index.js",
@@ -15,8 +15,8 @@ class NodeMailerProvider extends BaseProvider {
15
15
  port: Config.smtpPort,
16
16
  secure: Config.smtpPort,
17
17
  auth: {
18
- user: Config.emailUser,
19
- pass: Config.emailPass,
18
+ user: Config.fromEmail,
19
+ pass: Config.fromEmailPass,
20
20
  },
21
21
  });
22
22
  }
@@ -26,9 +26,8 @@ class NodeMailerProvider extends BaseProvider {
26
26
  this.validateEmailOptions(options);
27
27
  const mailOptions = this.buildMailOptions({
28
28
  ...options,
29
- from: options.from || Config.emailUser
29
+ from: options.from || Config.fromEmail
30
30
  });
31
-
32
31
  const result = await this.transporter.sendMail(mailOptions);
33
32
 
34
33
  logger.info('Email sent successfully via Nodemailer', {