nolimit-x 1.0.77 → 1.0.79
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 +13 -4
- package/src/sender.js +7 -17
package/package.json
CHANGED
package/src/processor.js
CHANGED
|
@@ -43,13 +43,22 @@ class ConfigManager {
|
|
|
43
43
|
const smtpRotation = this.config.configurations?.system?.smtp_rotation || false;
|
|
44
44
|
|
|
45
45
|
if (smtpRotation) {
|
|
46
|
-
// Load multiple SMTP providers from
|
|
47
|
-
|
|
46
|
+
// Load multiple SMTP providers from smtps.txt
|
|
47
|
+
const externalProviders = this.loadSmtpProviders();
|
|
48
|
+
// Merge config.json SMTP(s) + smtps.txt into one pool, deduplicated by host+user
|
|
49
|
+
const configSmtps = Array.isArray(this.config.smtp) ? this.config.smtp : [this.config.smtp];
|
|
50
|
+
const combined = [...configSmtps, ...externalProviders];
|
|
51
|
+
const seen = new Set();
|
|
52
|
+
this.smtpConfigs = combined.filter(s => {
|
|
53
|
+
const key = `${s.host}:${s.port}:${s.user}`;
|
|
54
|
+
if (seen.has(key)) return false;
|
|
55
|
+
seen.add(key);
|
|
56
|
+
return true;
|
|
57
|
+
});
|
|
48
58
|
if (this.smtpConfigs.length === 0) {
|
|
49
|
-
console.warn('SMTP rotation enabled but no providers found in smtps.txt, falling back to config.json');
|
|
50
59
|
this.smtpConfig = this.config.smtp[0];
|
|
51
60
|
} else {
|
|
52
|
-
this.smtpConfig = this.smtpConfigs[0];
|
|
61
|
+
this.smtpConfig = this.smtpConfigs[0];
|
|
53
62
|
}
|
|
54
63
|
} else {
|
|
55
64
|
// Use single SMTP from config.json
|
package/src/sender.js
CHANGED
|
@@ -277,21 +277,13 @@ async function send(options) {
|
|
|
277
277
|
: (Array.isArray(configManager.config.smtp) ? configManager.config.smtp : [configManager.config.smtp]);
|
|
278
278
|
const _smtpRotation = configManager.config.configurations?.system?.smtp_rotation === true && _smtpArr.length > 1;
|
|
279
279
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
}
|
|
287
|
-
console.log(`\n${GREEN}SMTP {${RESET}`);
|
|
288
|
-
console.log(` ${WHITE}Host:${RESET} ${GREEN}${smtpConf.host}${RESET}`);
|
|
289
|
-
console.log(` ${WHITE}Port:${RESET} ${GREEN}${smtpConf.port}${RESET}`);
|
|
290
|
-
console.log(` ${WHITE}Secure:${RESET} ${GREEN}${smtpConf.secure !== undefined ? smtpConf.secure : true}${RESET}`);
|
|
291
|
-
console.log(` ${WHITE}User:${RESET} ${GREEN}${utils.maskEmail(smtpConf.user || '')}${RESET}`);
|
|
292
|
-
console.log(` ${WHITE}Pass:${RESET} ***`);
|
|
293
|
-
console.log(`${GREEN}}${RESET}`);
|
|
294
|
-
}
|
|
280
|
+
console.log(`\n${GREEN}SMTP {${RESET}`);
|
|
281
|
+
console.log(` ${WHITE}Host:${RESET} ${GREEN}${smtpConf.host}${RESET}`);
|
|
282
|
+
console.log(` ${WHITE}Port:${RESET} ${GREEN}${smtpConf.port}${RESET}`);
|
|
283
|
+
console.log(` ${WHITE}Secure:${RESET} ${GREEN}${smtpConf.secure !== undefined ? smtpConf.secure : true}${RESET}`);
|
|
284
|
+
console.log(` ${WHITE}User:${RESET} ${GREEN}${utils.maskEmail(smtpConf.user || '')}${RESET}`);
|
|
285
|
+
console.log(` ${WHITE}Pass:${RESET} ***`);
|
|
286
|
+
console.log(`${GREEN}}${RESET}`);
|
|
295
287
|
|
|
296
288
|
// ═══════════════════════════════════════════════════════
|
|
297
289
|
// ACTIVE FEATURES
|
|
@@ -523,8 +515,6 @@ async function send(options) {
|
|
|
523
515
|
try { senderIntel.recordSuccessfulSend(campaignId, sender, email, result); } catch (e) { }
|
|
524
516
|
} else {
|
|
525
517
|
campaign.failedSends++;
|
|
526
|
-
const errMsg = result.error || result.message || 'unknown error';
|
|
527
|
-
console.log(`${RED}✗${RESET} ${WHITE}${email}${RESET} — ${RED}${errMsg}${RESET}`);
|
|
528
518
|
try { senderIntel.recordFailedSend(campaignId, sender, email, result); } catch (e) { }
|
|
529
519
|
}
|
|
530
520
|
campaign.processedEmails++;
|