nolimit-x 1.0.94 → 1.0.95
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/package.json +1 -1
- package/src/processor.js +6 -1
package/package.json
CHANGED
package/src/processor.js
CHANGED
|
@@ -234,7 +234,12 @@ class ConfigManager {
|
|
|
234
234
|
// Get random sender
|
|
235
235
|
getRandomSender() {
|
|
236
236
|
if (this.sendersList.length === 0) {
|
|
237
|
-
|
|
237
|
+
// Fall back to from_email, then SMTP user if from_email is empty
|
|
238
|
+
const fromEmail = this.config.configurations.from_email;
|
|
239
|
+
if (fromEmail && fromEmail.trim()) return fromEmail;
|
|
240
|
+
// Last resort: SMTP authenticated user
|
|
241
|
+
const smtp = Array.isArray(this.config.smtp) ? this.config.smtp[0] : this.config.smtp;
|
|
242
|
+
return smtp?.user || '';
|
|
238
243
|
}
|
|
239
244
|
|
|
240
245
|
const randomIndex = Math.floor(Math.random() * this.sendersList.length);
|