@arkstack/notifications 0.17.11 → 0.17.12
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/dist/index.js +3 -3
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -222,18 +222,19 @@ var MailNotification = class extends NotificationContract {
|
|
|
222
222
|
* Prepare the mail driver so we can use it to relay the message
|
|
223
223
|
*/
|
|
224
224
|
async prepareDriver() {
|
|
225
|
+
const options = this.options;
|
|
226
|
+
this.fromAddress = options.from ?? this.driverConfig.from ?? env("MAIL_FROM_ADDRESS", "no-reply@example.com");
|
|
225
227
|
if (typeof this.transport !== "string") {
|
|
226
228
|
this.driver = nodemailer.createTransport(this.transport);
|
|
227
229
|
return;
|
|
228
230
|
}
|
|
229
|
-
const options = this.options;
|
|
230
231
|
const transport = configure(`transports.${this.transport}`, {});
|
|
232
|
+
this.fromAddress = transport.from || this.fromAddress;
|
|
231
233
|
/**
|
|
232
234
|
* Setup nodemailer to stream messages so we can store the mail to file
|
|
233
235
|
*/
|
|
234
236
|
if (this.transport === "file") {
|
|
235
237
|
this.fileDirectory = options.directory ?? transport.directory ?? env("MAIL_FILE_PATH", join(Arkstack.rootDir(), "./storage/framework/mails"));
|
|
236
|
-
this.fromAddress = options.from ?? this.driverConfig.from ?? transport.from ?? env("MAIL_FROM_ADDRESS", "no-reply@example.com");
|
|
237
238
|
this.driver = nodemailer.createTransport({
|
|
238
239
|
streamTransport: true,
|
|
239
240
|
buffer: true
|
|
@@ -272,7 +273,6 @@ var MailNotification = class extends NotificationContract {
|
|
|
272
273
|
}
|
|
273
274
|
const user = options.user ?? transport.auth?.user ?? transport.user ?? env("MAIL_USERNAME", "");
|
|
274
275
|
const pass = options.pass ?? transport.auth?.pass ?? transport.pass ?? env("MAIL_PASSWORD", "");
|
|
275
|
-
this.fromAddress = options.from ?? this.driverConfig.from ?? transport.from ?? env("MAIL_FROM_ADDRESS", "no-reply@example.com");
|
|
276
276
|
this.driver = nodemailer.createTransport({
|
|
277
277
|
url: transport.url ?? options.url ?? env("MAIL_URL"),
|
|
278
278
|
host: options.host ?? transport.host ?? env("MAIL_HOST", "localhost"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arkstack/notifications",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.12",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Framework-agnostic notification module for Arkstack and Nodejs, providing support for multi-channel notification delivery.",
|
|
6
6
|
"homepage": "https://arkstack.toneflix.net/guide/notifications",
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
"africastalking": "^0.8.0",
|
|
35
35
|
"nodemailer": "^9.0.3",
|
|
36
36
|
"twilio": "^6.0.2",
|
|
37
|
-
"@arkstack/common": "^0.17.
|
|
37
|
+
"@arkstack/common": "^0.17.12"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"@kanun-hq/plugin-phone": "^0.1.8",
|
|
41
41
|
"firebase-admin": "^13.0.0",
|
|
42
42
|
"pusher": "^5.2.0",
|
|
43
|
-
"@arkstack/
|
|
44
|
-
"@arkstack/
|
|
43
|
+
"@arkstack/database": "^0.17.12",
|
|
44
|
+
"@arkstack/contract": "^0.17.12"
|
|
45
45
|
},
|
|
46
46
|
"peerDependenciesMeta": {
|
|
47
47
|
"pusher": {
|