nolimit-x 1.0.89 → 1.0.91
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/advanced-name-extractor.js +1 -1
- package/src/sender.js +9 -41
package/package.json
CHANGED
|
@@ -694,7 +694,7 @@ class AdvancedNameExtractor {
|
|
|
694
694
|
const localPart = email.split('@')[0];
|
|
695
695
|
// 1. Try advanced split/pattern recognition
|
|
696
696
|
const splitResult = this.advancedBestSplitName(localPart);
|
|
697
|
-
if (splitResult && splitResult.confidence >=
|
|
697
|
+
if (splitResult && splitResult.confidence >= 70) {
|
|
698
698
|
return {
|
|
699
699
|
name: splitResult.name,
|
|
700
700
|
confidence: splitResult.confidence * 100,
|
package/src/sender.js
CHANGED
|
@@ -735,43 +735,14 @@ async function sendEmailViaRust(jobs, useRawSmtp) {
|
|
|
735
735
|
}
|
|
736
736
|
|
|
737
737
|
} catch (error) {
|
|
738
|
-
//
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
maxConnections: 5,
|
|
747
|
-
auth: { user: smtpConf.user, pass: smtpConf.pass }
|
|
748
|
-
});
|
|
749
|
-
const results = [];
|
|
750
|
-
for (const job of jobs) {
|
|
751
|
-
try {
|
|
752
|
-
const fromAddr = job.from || job.from_email;
|
|
753
|
-
const mailOptions = {
|
|
754
|
-
from: job.from_name ? `"${job.from_name}" <${fromAddr}>` : fromAddr,
|
|
755
|
-
to: job.to || job.to_email,
|
|
756
|
-
subject: job.subject,
|
|
757
|
-
html: job.body,
|
|
758
|
-
replyTo: job.reply_to,
|
|
759
|
-
priority: job.priority
|
|
760
|
-
};
|
|
761
|
-
if (job.custom_headers) mailOptions.headers = job.custom_headers;
|
|
762
|
-
if (job.attachments && job.attachments.length > 0) {
|
|
763
|
-
mailOptions.attachments = job.attachments.map(att => ({
|
|
764
|
-
filename: att.filename, content: att.content
|
|
765
|
-
}));
|
|
766
|
-
}
|
|
767
|
-
const info = await transporter.sendMail(mailOptions);
|
|
768
|
-
results.push({ success: true, message_id: info.messageId, error: null });
|
|
769
|
-
} catch (err) {
|
|
770
|
-
results.push({ success: false, message_id: null, error: err.message });
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
transporter.close();
|
|
774
|
-
return results;
|
|
738
|
+
// Do NOT fall back to nodemailer — opening more connections to the same
|
|
739
|
+
// server while Rust's may still be closing causes connection stacking.
|
|
740
|
+
console.error(`Rust backend failed: ${error.message}`);
|
|
741
|
+
return jobs.map(job => ({
|
|
742
|
+
success: false,
|
|
743
|
+
message_id: null,
|
|
744
|
+
error: `Backend failed: ${error.message}`
|
|
745
|
+
}));
|
|
775
746
|
}
|
|
776
747
|
}
|
|
777
748
|
|
|
@@ -1058,7 +1029,7 @@ function sendSMSViaRust(phoneNumber, message, sender, config) {
|
|
|
1058
1029
|
|
|
1059
1030
|
// Always send as an array, even for a single job
|
|
1060
1031
|
const payload = JSON.stringify([jobData]);
|
|
1061
|
-
|
|
1032
|
+
|
|
1062
1033
|
child.stdin.write(payload);
|
|
1063
1034
|
child.stdin.end();
|
|
1064
1035
|
});
|
|
@@ -1475,10 +1446,8 @@ class EnhancedSenderRanker {
|
|
|
1475
1446
|
}
|
|
1476
1447
|
}
|
|
1477
1448
|
|
|
1478
|
-
console.warn(`[ENHANCED-SENDER-RANKER] Could not find senders file at any of: ${possiblePaths.join(', ')}`);
|
|
1479
1449
|
return [];
|
|
1480
1450
|
} catch (error) {
|
|
1481
|
-
console.error(`[ENHANCED-SENDER-RANKER] Error loading senders: ${error.message}`);
|
|
1482
1451
|
return [];
|
|
1483
1452
|
}
|
|
1484
1453
|
}
|
|
@@ -1530,7 +1499,6 @@ class EnhancedSenderRanker {
|
|
|
1530
1499
|
// Select best sender with enhanced scoring
|
|
1531
1500
|
selectBestSender(recipientDomain) {
|
|
1532
1501
|
if (this.senders.length === 0) {
|
|
1533
|
-
console.warn('[ENHANCED-SENDER-RANKER] No senders available');
|
|
1534
1502
|
return null;
|
|
1535
1503
|
}
|
|
1536
1504
|
|