@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 +1 -2
- package/package.json +1 -1
- package/providers/NodeMailerProvider.js +3 -4
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
|
@@ -15,8 +15,8 @@ class NodeMailerProvider extends BaseProvider {
|
|
|
15
15
|
port: Config.smtpPort,
|
|
16
16
|
secure: Config.smtpPort,
|
|
17
17
|
auth: {
|
|
18
|
-
user: Config.
|
|
19
|
-
pass: Config.
|
|
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.
|
|
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', {
|