nolimit-x 1.0.90 → 1.0.92

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nolimit-x",
3
- "version": "1.0.90",
3
+ "version": "1.0.92",
4
4
  "description": "Advanced email sender ",
5
5
  "main": "src/cli.js",
6
6
  "bin": {
package/src/processor.js CHANGED
@@ -384,6 +384,15 @@ class CampaignProcessor {
384
384
 
385
385
  // Enhanced dynamic URL generation
386
386
  let dynamicLink = this.configManager.config.configurations.link || '';
387
+ // Pre-resolve placeholders in the link BEFORE URL parsing.
388
+ // new URL() encodes {{ }} braces to %7B%7B / %7D%7D, which prevents
389
+ // the placeholder regex from ever matching them. Resolve now while
390
+ // we have the recipient data available.
391
+ dynamicLink = resolvePlaceholders(dynamicLink, {
392
+ EMAIL: email,
393
+ DOMAIN: domain,
394
+ FROM_EMAIL: senderEmail
395
+ });
387
396
  if (this.engineConfig.isFeatureEnabled('dynamicUrlGeneration') && dynamicLink.trim()) {
388
397
  try {
389
398
  dynamicLink = this.urlGenerator.generateDynamicURL(dynamicLink, domain, email);
package/src/sender.js CHANGED
@@ -735,43 +735,14 @@ async function sendEmailViaRust(jobs, useRawSmtp) {
735
735
  }
736
736
 
737
737
  } catch (error) {
738
- // Fallback to Node.js implementation silentlyreuse one transporter
739
- const nodemailer = require('nodemailer');
740
- const smtpConf = Array.isArray(jobs[0].smtp) ? jobs[0].smtp[0] : jobs[0].smtp;
741
- const transporter = nodemailer.createTransport({
742
- host: smtpConf.host,
743
- port: smtpConf.port,
744
- secure: smtpConf.secure,
745
- pool: true,
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