Plugin Directory

Changeset 3398904


Ignore:
Timestamp:
11/19/2025 11:37:16 AM (4 months ago)
Author:
acyba
Message:

10.6.4 - campaigns sending patch for slow servers

Location:
acymailing
Files:
30 edited
1 copied

Legend:

Unmodified
Added
Removed
  • acymailing/tags/10.6.4/back/Classes/CampaignClass.php

    r3397048 r3398904  
    10241024    }
    10251025
    1026     private function generateCampaign(object $campaign, object $campaignMail, int $lastGenerated, MailClass $mailClass): object
     1026    private function generateCampaign(object $campaign, object $campaignMail, ?int $lastGenerated, MailClass $mailClass): object
    10271027    {
    10281028        $newMail = $this->generateMailAutoCampaign($campaignMail, $campaign->sending_params['number_generated'], $mailClass);
  • acymailing/tags/10.6.4/back/Classes/MailClass.php

    r3397048 r3398904  
    10171017    public function sendAutomation(int $mailId, array $userIds, string $sendingDate, array $automationAdmin = [])
    10181018    {
    1019         if (empty($mailId)) return acym_translationSprintf('ACYM_EMAILS_ADDED_QUEUE', 0);
    1020         if (empty($sendingDate)) return acym_translation('ACYM_WRONG_DATE');
    1021         if (empty($userIds)) return acym_translation('ACYM_USER_NOT_FOUND');
     1019        if (empty($mailId)) {
     1020            return acym_translationSprintf('ACYM_EMAILS_ADDED_QUEUE', 0);
     1021        }
     1022
     1023        if (empty($sendingDate)) {
     1024            return acym_translation('ACYM_WRONG_DATE');
     1025        }
     1026
     1027        if (empty($userIds)) {
     1028            return acym_translation('ACYM_USER_NOT_FOUND');
     1029        }
     1030
    10221031        acym_arrayToInteger($userIds);
    10231032
    1024         if (isset($automationAdmin['automationAdmin']) && $automationAdmin['automationAdmin']) {
    1025             $userClass = new UserClass();
    1026             $mail = $this->getOneById($mailId);
    1027             $user = $userClass->getOneById($automationAdmin['user_id']);
    1028 
    1029             if (empty($mail) || empty($user)) return false;
    1030 
    1031             $mailerHelper = new MailerHelper();
    1032             $pluginHelper = new PluginHelper();
    1033             $extractedTags = $pluginHelper->extractTags($mail, 'subscriber');
    1034             if (!empty($extractedTags)) {
    1035                 foreach ($extractedTags as $dtext => $oneTag) {
    1036                     if (empty($oneTag->info) || $oneTag->info != 'current' || empty($user->{$oneTag->id})) continue;
    1037 
    1038                     $mailerHelper->addParam(str_replace(['{', '}'], '', $dtext), $user->{$oneTag->id});
    1039                 }
    1040             }
    1041 
    1042             if (!empty($automationAdmin['user_id'])) {
    1043                 $userClass = new UserClass();
    1044                 $user = $userClass->getOneById($automationAdmin['user_id']);
    1045                 if (!empty($user)) {
    1046                     $userField = $userClass->getAllUserFields($user);
    1047                     foreach ($userField as $map => $value) {
    1048                         $mailerHelper->addParam('user:'.$map, $value);
    1049                     }
    1050                 }
    1051             }
    1052 
    1053             $emailsSent = 0;
    1054             foreach ($userIds as $userId) {
    1055                 if ($mailerHelper->sendOne($mail->id, $userId)) {
    1056                     $emailsSent++;
    1057                 }
    1058             }
    1059 
    1060             return $emailsSent;
     1033        $nbSent = $this->sendNotification($mailId, $userIds, $automationAdmin);
     1034        if (!is_null($nbSent)) {
     1035            return $nbSent;
    10611036        }
    10621037
     
    10681043        );
    10691044
     1045        if ($result === 0) {
     1046            return acym_translation('ACYM_CAMPAIGN_ALREADY_QUEUED');
     1047        }
    10701048
    10711049        $mailStatClass = new MailStatClass();
     
    10811059        $mailStatClass->save($newMailStat);
    10821060
    1083         if ($result === 0) {
    1084             return acym_translation('ACYM_CAMPAIGN_ALREADY_QUEUED');
    1085         }
    1086 
    10871061        return $result;
     1062    }
     1063
     1064    private function sendNotification(int $mailId, array $userIds, array $automationAdmin): ?int
     1065    {
     1066        if (empty($automationAdmin['user_id'])) {
     1067            return null;
     1068        }
     1069
     1070        $userClass = new UserClass();
     1071        $mail = $this->getOneById($mailId);
     1072        $user = $userClass->getOneById($automationAdmin['user_id']);
     1073
     1074        if (empty($mail) || empty($user)) {
     1075            return 0;
     1076        }
     1077
     1078        $mailerHelper = new MailerHelper();
     1079        $pluginHelper = new PluginHelper();
     1080        $extractedTags = $pluginHelper->extractTags($mail, 'subscriber');
     1081
     1082        $isNotification = false;
     1083        foreach ($extractedTags as $dtext => $oneTag) {
     1084            if (empty($oneTag->info) || $oneTag->info !== 'current') {
     1085                continue;
     1086            }
     1087
     1088            $isNotification = true;
     1089
     1090            if (!empty($user->{$oneTag->id})) {
     1091                $mailerHelper->addParam(str_replace(['{', '}'], '', $dtext), $user->{$oneTag->id});
     1092            }
     1093        }
     1094
     1095        if (!$isNotification) {
     1096            if (isset($automationAdmin['automationAdmin']) && $automationAdmin['automationAdmin']) {
     1097                return 0;
     1098            } else {
     1099                return null;
     1100            }
     1101        }
     1102
     1103        $userFields = $userClass->getAllUserFields($user);
     1104        foreach ($userFields as $map => $value) {
     1105            $mailerHelper->addParam('subscriber:'.$map.'|info:current', $value);
     1106            $mailerHelper->addParam('user:'.$map, $value);
     1107        }
     1108
     1109        $emailsSent = 0;
     1110        foreach ($userIds as $userId) {
     1111            if ($mailerHelper->sendOne($mail->id, $userId)) {
     1112                $emailsSent++;
     1113            }
     1114        }
     1115
     1116        return $emailsSent;
    10881117    }
    10891118
  • acymailing/tags/10.6.4/back/Classes/UserClass.php

    r3397048 r3398904  
    528528    }
    529529
    530     public function subscribe(array $userIds, array $addLists, bool $trigger = true, bool $forceFront = false): bool
     530    public function subscribe($userIds, array $addLists, bool $trigger = true, bool $forceFront = false): bool
    531531    {
    532532        if (empty($addLists)) {
  • acymailing/tags/10.6.4/back/Controllers/DashboardController.php

    r3398232 r3398904  
    4545        $splashJson = acym_fileGetContent(ACYM_NEW_FEATURES_SPLASHSCREEN_JSON);
    4646        $version = json_decode($splashJson);
    47         if (version_compare($this->config->get('previous_version', '10.6.3'), $version->max_version, '>=')) {
     47        if (version_compare($this->config->get('previous_version', '10.6.4'), $version->max_version, '>=')) {
    4848            @unlink(ACYM_NEW_FEATURES_SPLASHSCREEN_JSON);
    4949            $this->listing();
  • acymailing/tags/10.6.4/back/Core/AcymClass.php

    r3397048 r3398904  
    178178                $element->$oneColumn = [];
    179179            } elseif (is_string($element->$oneColumn)) {
    180                 $element->$oneColumn = [];
     180                $element->$oneColumn = json_decode($element->$oneColumn, true);
    181181            }
    182182        }
  • acymailing/tags/10.6.4/back/Core/wordpress/extension.php

    r3398232 r3398904  
    3131            'title' => acym_translation('ACYM_ARTICLE'),
    3232            'folder_name' => 'post',
    33             'version' => '10.6.3',
     33            'version' => '10.6.4',
    3434            'active' => '1',
    3535            'category' => 'Content management',
     
    3737            'uptodate' => '1',
    3838            'description' => '- Insert WordPress posts in your emails<br/>- Insert the latest posts of a category in an automatic email',
    39             'latest_version' => '10.6.3',
     39            'latest_version' => '10.6.4',
    4040            'type' => 'CORE',
    4141        ],
     
    4343            'title' => acym_translation('ACYM_PAGE'),
    4444            'folder_name' => 'page',
    45             'version' => '10.6.3',
     45            'version' => '10.6.4',
    4646            'active' => '1',
    4747            'category' => 'Content management',
     
    4949            'uptodate' => '1',
    5050            'description' => '- Insert pages in your emails',
    51             'latest_version' => '10.6.3',
     51            'latest_version' => '10.6.4',
    5252            'type' => 'CORE',
    5353        ],
     
    5555            'title' => acym_translation('ACYM_CREATE_USER'),
    5656            'folder_name' => 'createuser',
    57             'version' => '10.6.3',
     57            'version' => '10.6.4',
    5858            'active' => '1',
    5959            'category' => 'User management',
     
    6161            'uptodate' => '1',
    6262            'description' => '- Automatically creates a site user when an AcyMailing subscriber is created',
    63             'latest_version' => '10.6.3',
     63            'latest_version' => '10.6.4',
    6464            'type' => 'CORE',
    6565        ],
  • acymailing/tags/10.6.4/back/Helpers/CronHelper.php

    r3397048 r3398904  
    338338        }
    339339
    340         if ($this->isSendingCall || !acym_level(ACYM_ENTERPRISE) || !function_exists('fsockopen')) {
     340        if ($this->isSendingCall || !acym_level(ACYM_ENTERPRISE) || !function_exists('curl_multi_exec')) {
    341341            $this->sendQueuedEmails();
    342342        } else {
  • acymailing/tags/10.6.4/back/Helpers/Update/Configuration.php

    r3398232 r3398904  
    123123        $allPref['Essential'] = ACYM_ESSENTIAL;
    124124        $allPref['Enterprise'] = ACYM_ENTERPRISE;
    125         $allPref['previous_version'] = '10.6.3';
     125        $allPref['previous_version'] = '10.6.4';
    126126
    127127        $allPref['display_built_by'] = acym_level(ACYM_ESSENTIAL) ? 0 : 1;
  • acymailing/tags/10.6.4/back/Helpers/UpdateHelper.php

    r3398232 r3398904  
    2222
    2323    private string $level = 'starter';
    24     private string $version = '10.6.3';
     24    private string $version = '10.6.4';
    2525    private string $previousVersion;
    2626    private bool $isUpdating = false;
  • acymailing/tags/10.6.4/back/Helpers/global/curl.php

    r3397048 r3398904  
    9696function acym_asyncUrlCalls(array $urls): void
    9797{
    98     if (!function_exists('fsockopen')) {
     98    if (!function_exists('curl_multi_exec')) {
    9999        return;
    100100    }
    101101
    102     foreach ($urls as $url) {
    103         $parts = parse_url($url);
    104         $isSecure = ($parts['scheme'] ?? 'http') === 'https';
     102    try {
     103        $mh = curl_multi_init();
    105104
    106         $scheme = $isSecure ? 'ssl://' : '';
    107         $host = $parts['host'] ?? '';
    108         $port = $parts['port'] ?? ($isSecure ? 443 : 80);
    109         $path = ($parts['path'] ?? '/').(isset($parts['query']) ? '?'.$parts['query'] : '');
     105        $handles = [];
     106        foreach ($urls as $url) {
     107            $ch = curl_init();
     108            curl_setopt($ch, CURLOPT_URL, $url);
     109            curl_setopt($ch, CURLOPT_HEADER, 0);
     110            curl_setopt($ch, CURLOPT_TIMEOUT, 1);
     111            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
     112            curl_multi_add_handle($mh, $ch);
     113            $handles[] = $ch;
     114        }
    110115
    111         try {
    112             $fp = @fsockopen($scheme.$host, $port, $errno, $errstr, 1);
    113             if ($fp) {
    114                 $out = "GET $path HTTP/1.1\r\n";
    115                 $out .= "Host: $host\r\n";
    116                 $out .= "Connection: Close\r\n\r\n";
     116        $running = null;
     117        $time = 1;
     118        do {
     119            curl_multi_exec($mh, $running);
     120            usleep(100);
     121            if ($time > 50000) {
     122                break;
     123            }
     124            $time++;
     125        } while ($running);
    117126
    118                 fwrite($fp, $out);
    119                 fclose($fp);
    120             } else {
    121                 throw new Exception($errstr.' ('.$errno.')');
    122             }
    123         } catch (Exception $e) {
    124             $config = acym_config();
    125             $reportPath = $config->get('cron_savepath');
    126             if (!empty($reportPath)) {
    127                 $reportPath = str_replace(['{year}', '{month}'], [date('Y'), date('m')], $reportPath);
    128                 $reportPath = acym_cleanPath(ACYM_ROOT.trim(html_entity_decode($reportPath)));
    129                 acym_createDir(dirname($reportPath), true, true);
     127        foreach ($handles as $handle) {
     128            curl_multi_remove_handle($mh, $handle);
     129            curl_close($handle);
     130        }
     131        curl_multi_close($mh);
     132    } catch (Exception $e) {
     133        $config = acym_config();
     134        $reportPath = $config->get('cron_savepath');
     135        if (!empty($reportPath)) {
     136            $reportPath = str_replace(['{year}', '{month}'], [date('Y'), date('m')], $reportPath);
     137            $reportPath = acym_cleanPath(ACYM_ROOT.trim(html_entity_decode($reportPath)));
     138            acym_createDir(dirname($reportPath), true, true);
    130139
    131                 $lr = "\r\n";
    132                 file_put_contents(
    133                     $reportPath,
    134                     $lr.$lr.'********************     '.acym_getDate(
    135                         time()
    136                     ).'     ********************'.$lr.'An error occurred while calling the queue sending script, please make sure the PHP function "fsockopen" is activated on your server: '.$e->getMessage(
    137                     ),
    138                     FILE_APPEND
    139                 );
    140             }
     140            $lr = "\r\n";
     141            file_put_contents(
     142                $reportPath,
     143                $lr.$lr.'********************     '.acym_getDate(
     144                    time()
     145                ).'     ********************'.$lr.'An error occurred while calling the queue sending script, please make sure the PHP function "curl_multi_exec" is activated on your server: '.$e->getMessage(
     146                ),
     147                FILE_APPEND
     148            );
    141149        }
    142150    }
  • acymailing/tags/10.6.4/index.php

    r3398232 r3398904  
    66 * Author URI: https://www.acymailing.com
    77 * License: GPLv3
    8  * Version: 10.6.3
     8 * Version: 10.6.4
    99 * Text Domain: acymailing
    1010 * Domain Path: /language
  • acymailing/tags/10.6.4/language/acymailing.pot

    r3398232 r3398904  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: AcyMailing 10.6.3\n"
     3"Project-Id-Version: AcyMailing 10.6.4\n"
    44"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/acymailing\n"
    55"MIME-Version: 1.0\n"
    66"Content-Type: text/plain; charset=UTF-8\n"
    77"Content-Transfer-Encoding: 8bit\n"
    8 "POT-Creation-Date: 2025-11-18\n"
     8"POT-Creation-Date: 2025-11-19\n"
    99"X-Domain: acymailing\n"
    1010
  • acymailing/tags/10.6.4/language/en-US.com_acym.ini

    r3398232 r3398904  
    1 ACYM_VERSION="10.6.3"
     1ACYM_VERSION="10.6.4"
    22
    33
  • acymailing/tags/10.6.4/readme.txt

    r3398232 r3398904  
    44Requires at least: 5.5
    55Tested up to: 6.8
    6 Stable tag: 10.6.3
     6Stable tag: 10.6.4
    77Requires PHP: 7.4.0
    88License: GPLv3
     
    114114== Changelog ==
    115115
    116 = 10.6.3 - November 18, 2025 =
    117 * The license is now correctly recognized when switching to another license key while in expired free trial period.
    118 * We fixed an issue related to the attachments included in sent emails.
     116= 10.6.4 - November 19, 2025 =
     117* Automation emails sent to admins can now contain information from the user that triggered the automation.
     118
     119* The saving of campaign settings has been fixed when using segments and send frequencies.
     120* The automated emails sending now correctly handles servers with slow connection.
    119121
    120122[See the whole changelog here.](https://www.acymailing.com/changelog)
  • acymailing/tags/10.6.4/vendor/composer/installed.php

    r3398232 r3398904  
    44        'pretty_version' => 'dev-develop',
    55        'version' => 'dev-develop',
    6         'reference' => 'a30e87f4a38ebc9fbbf1669781dc0c7d29a00f1a',
     6        'reference' => '6af10f311e36a1c05b5876e5a6cc48c8c490032f',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-develop',
    1515            'version' => 'dev-develop',
    16             'reference' => 'a30e87f4a38ebc9fbbf1669781dc0c7d29a00f1a',
     16            'reference' => '6af10f311e36a1c05b5876e5a6cc48c8c490032f',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
  • acymailing/trunk/back/Classes/CampaignClass.php

    r3397048 r3398904  
    10241024    }
    10251025
    1026     private function generateCampaign(object $campaign, object $campaignMail, int $lastGenerated, MailClass $mailClass): object
     1026    private function generateCampaign(object $campaign, object $campaignMail, ?int $lastGenerated, MailClass $mailClass): object
    10271027    {
    10281028        $newMail = $this->generateMailAutoCampaign($campaignMail, $campaign->sending_params['number_generated'], $mailClass);
  • acymailing/trunk/back/Classes/MailClass.php

    r3397048 r3398904  
    10171017    public function sendAutomation(int $mailId, array $userIds, string $sendingDate, array $automationAdmin = [])
    10181018    {
    1019         if (empty($mailId)) return acym_translationSprintf('ACYM_EMAILS_ADDED_QUEUE', 0);
    1020         if (empty($sendingDate)) return acym_translation('ACYM_WRONG_DATE');
    1021         if (empty($userIds)) return acym_translation('ACYM_USER_NOT_FOUND');
     1019        if (empty($mailId)) {
     1020            return acym_translationSprintf('ACYM_EMAILS_ADDED_QUEUE', 0);
     1021        }
     1022
     1023        if (empty($sendingDate)) {
     1024            return acym_translation('ACYM_WRONG_DATE');
     1025        }
     1026
     1027        if (empty($userIds)) {
     1028            return acym_translation('ACYM_USER_NOT_FOUND');
     1029        }
     1030
    10221031        acym_arrayToInteger($userIds);
    10231032
    1024         if (isset($automationAdmin['automationAdmin']) && $automationAdmin['automationAdmin']) {
    1025             $userClass = new UserClass();
    1026             $mail = $this->getOneById($mailId);
    1027             $user = $userClass->getOneById($automationAdmin['user_id']);
    1028 
    1029             if (empty($mail) || empty($user)) return false;
    1030 
    1031             $mailerHelper = new MailerHelper();
    1032             $pluginHelper = new PluginHelper();
    1033             $extractedTags = $pluginHelper->extractTags($mail, 'subscriber');
    1034             if (!empty($extractedTags)) {
    1035                 foreach ($extractedTags as $dtext => $oneTag) {
    1036                     if (empty($oneTag->info) || $oneTag->info != 'current' || empty($user->{$oneTag->id})) continue;
    1037 
    1038                     $mailerHelper->addParam(str_replace(['{', '}'], '', $dtext), $user->{$oneTag->id});
    1039                 }
    1040             }
    1041 
    1042             if (!empty($automationAdmin['user_id'])) {
    1043                 $userClass = new UserClass();
    1044                 $user = $userClass->getOneById($automationAdmin['user_id']);
    1045                 if (!empty($user)) {
    1046                     $userField = $userClass->getAllUserFields($user);
    1047                     foreach ($userField as $map => $value) {
    1048                         $mailerHelper->addParam('user:'.$map, $value);
    1049                     }
    1050                 }
    1051             }
    1052 
    1053             $emailsSent = 0;
    1054             foreach ($userIds as $userId) {
    1055                 if ($mailerHelper->sendOne($mail->id, $userId)) {
    1056                     $emailsSent++;
    1057                 }
    1058             }
    1059 
    1060             return $emailsSent;
     1033        $nbSent = $this->sendNotification($mailId, $userIds, $automationAdmin);
     1034        if (!is_null($nbSent)) {
     1035            return $nbSent;
    10611036        }
    10621037
     
    10681043        );
    10691044
     1045        if ($result === 0) {
     1046            return acym_translation('ACYM_CAMPAIGN_ALREADY_QUEUED');
     1047        }
    10701048
    10711049        $mailStatClass = new MailStatClass();
     
    10811059        $mailStatClass->save($newMailStat);
    10821060
    1083         if ($result === 0) {
    1084             return acym_translation('ACYM_CAMPAIGN_ALREADY_QUEUED');
    1085         }
    1086 
    10871061        return $result;
     1062    }
     1063
     1064    private function sendNotification(int $mailId, array $userIds, array $automationAdmin): ?int
     1065    {
     1066        if (empty($automationAdmin['user_id'])) {
     1067            return null;
     1068        }
     1069
     1070        $userClass = new UserClass();
     1071        $mail = $this->getOneById($mailId);
     1072        $user = $userClass->getOneById($automationAdmin['user_id']);
     1073
     1074        if (empty($mail) || empty($user)) {
     1075            return 0;
     1076        }
     1077
     1078        $mailerHelper = new MailerHelper();
     1079        $pluginHelper = new PluginHelper();
     1080        $extractedTags = $pluginHelper->extractTags($mail, 'subscriber');
     1081
     1082        $isNotification = false;
     1083        foreach ($extractedTags as $dtext => $oneTag) {
     1084            if (empty($oneTag->info) || $oneTag->info !== 'current') {
     1085                continue;
     1086            }
     1087
     1088            $isNotification = true;
     1089
     1090            if (!empty($user->{$oneTag->id})) {
     1091                $mailerHelper->addParam(str_replace(['{', '}'], '', $dtext), $user->{$oneTag->id});
     1092            }
     1093        }
     1094
     1095        if (!$isNotification) {
     1096            if (isset($automationAdmin['automationAdmin']) && $automationAdmin['automationAdmin']) {
     1097                return 0;
     1098            } else {
     1099                return null;
     1100            }
     1101        }
     1102
     1103        $userFields = $userClass->getAllUserFields($user);
     1104        foreach ($userFields as $map => $value) {
     1105            $mailerHelper->addParam('subscriber:'.$map.'|info:current', $value);
     1106            $mailerHelper->addParam('user:'.$map, $value);
     1107        }
     1108
     1109        $emailsSent = 0;
     1110        foreach ($userIds as $userId) {
     1111            if ($mailerHelper->sendOne($mail->id, $userId)) {
     1112                $emailsSent++;
     1113            }
     1114        }
     1115
     1116        return $emailsSent;
    10881117    }
    10891118
  • acymailing/trunk/back/Classes/UserClass.php

    r3397048 r3398904  
    528528    }
    529529
    530     public function subscribe(array $userIds, array $addLists, bool $trigger = true, bool $forceFront = false): bool
     530    public function subscribe($userIds, array $addLists, bool $trigger = true, bool $forceFront = false): bool
    531531    {
    532532        if (empty($addLists)) {
  • acymailing/trunk/back/Controllers/DashboardController.php

    r3398232 r3398904  
    4545        $splashJson = acym_fileGetContent(ACYM_NEW_FEATURES_SPLASHSCREEN_JSON);
    4646        $version = json_decode($splashJson);
    47         if (version_compare($this->config->get('previous_version', '10.6.3'), $version->max_version, '>=')) {
     47        if (version_compare($this->config->get('previous_version', '10.6.4'), $version->max_version, '>=')) {
    4848            @unlink(ACYM_NEW_FEATURES_SPLASHSCREEN_JSON);
    4949            $this->listing();
  • acymailing/trunk/back/Core/AcymClass.php

    r3397048 r3398904  
    178178                $element->$oneColumn = [];
    179179            } elseif (is_string($element->$oneColumn)) {
    180                 $element->$oneColumn = [];
     180                $element->$oneColumn = json_decode($element->$oneColumn, true);
    181181            }
    182182        }
  • acymailing/trunk/back/Core/wordpress/extension.php

    r3398232 r3398904  
    3131            'title' => acym_translation('ACYM_ARTICLE'),
    3232            'folder_name' => 'post',
    33             'version' => '10.6.3',
     33            'version' => '10.6.4',
    3434            'active' => '1',
    3535            'category' => 'Content management',
     
    3737            'uptodate' => '1',
    3838            'description' => '- Insert WordPress posts in your emails<br/>- Insert the latest posts of a category in an automatic email',
    39             'latest_version' => '10.6.3',
     39            'latest_version' => '10.6.4',
    4040            'type' => 'CORE',
    4141        ],
     
    4343            'title' => acym_translation('ACYM_PAGE'),
    4444            'folder_name' => 'page',
    45             'version' => '10.6.3',
     45            'version' => '10.6.4',
    4646            'active' => '1',
    4747            'category' => 'Content management',
     
    4949            'uptodate' => '1',
    5050            'description' => '- Insert pages in your emails',
    51             'latest_version' => '10.6.3',
     51            'latest_version' => '10.6.4',
    5252            'type' => 'CORE',
    5353        ],
     
    5555            'title' => acym_translation('ACYM_CREATE_USER'),
    5656            'folder_name' => 'createuser',
    57             'version' => '10.6.3',
     57            'version' => '10.6.4',
    5858            'active' => '1',
    5959            'category' => 'User management',
     
    6161            'uptodate' => '1',
    6262            'description' => '- Automatically creates a site user when an AcyMailing subscriber is created',
    63             'latest_version' => '10.6.3',
     63            'latest_version' => '10.6.4',
    6464            'type' => 'CORE',
    6565        ],
  • acymailing/trunk/back/Helpers/CronHelper.php

    r3397048 r3398904  
    338338        }
    339339
    340         if ($this->isSendingCall || !acym_level(ACYM_ENTERPRISE) || !function_exists('fsockopen')) {
     340        if ($this->isSendingCall || !acym_level(ACYM_ENTERPRISE) || !function_exists('curl_multi_exec')) {
    341341            $this->sendQueuedEmails();
    342342        } else {
  • acymailing/trunk/back/Helpers/Update/Configuration.php

    r3398232 r3398904  
    123123        $allPref['Essential'] = ACYM_ESSENTIAL;
    124124        $allPref['Enterprise'] = ACYM_ENTERPRISE;
    125         $allPref['previous_version'] = '10.6.3';
     125        $allPref['previous_version'] = '10.6.4';
    126126
    127127        $allPref['display_built_by'] = acym_level(ACYM_ESSENTIAL) ? 0 : 1;
  • acymailing/trunk/back/Helpers/UpdateHelper.php

    r3398232 r3398904  
    2222
    2323    private string $level = 'starter';
    24     private string $version = '10.6.3';
     24    private string $version = '10.6.4';
    2525    private string $previousVersion;
    2626    private bool $isUpdating = false;
  • acymailing/trunk/back/Helpers/global/curl.php

    r3397048 r3398904  
    9696function acym_asyncUrlCalls(array $urls): void
    9797{
    98     if (!function_exists('fsockopen')) {
     98    if (!function_exists('curl_multi_exec')) {
    9999        return;
    100100    }
    101101
    102     foreach ($urls as $url) {
    103         $parts = parse_url($url);
    104         $isSecure = ($parts['scheme'] ?? 'http') === 'https';
     102    try {
     103        $mh = curl_multi_init();
    105104
    106         $scheme = $isSecure ? 'ssl://' : '';
    107         $host = $parts['host'] ?? '';
    108         $port = $parts['port'] ?? ($isSecure ? 443 : 80);
    109         $path = ($parts['path'] ?? '/').(isset($parts['query']) ? '?'.$parts['query'] : '');
     105        $handles = [];
     106        foreach ($urls as $url) {
     107            $ch = curl_init();
     108            curl_setopt($ch, CURLOPT_URL, $url);
     109            curl_setopt($ch, CURLOPT_HEADER, 0);
     110            curl_setopt($ch, CURLOPT_TIMEOUT, 1);
     111            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
     112            curl_multi_add_handle($mh, $ch);
     113            $handles[] = $ch;
     114        }
    110115
    111         try {
    112             $fp = @fsockopen($scheme.$host, $port, $errno, $errstr, 1);
    113             if ($fp) {
    114                 $out = "GET $path HTTP/1.1\r\n";
    115                 $out .= "Host: $host\r\n";
    116                 $out .= "Connection: Close\r\n\r\n";
     116        $running = null;
     117        $time = 1;
     118        do {
     119            curl_multi_exec($mh, $running);
     120            usleep(100);
     121            if ($time > 50000) {
     122                break;
     123            }
     124            $time++;
     125        } while ($running);
    117126
    118                 fwrite($fp, $out);
    119                 fclose($fp);
    120             } else {
    121                 throw new Exception($errstr.' ('.$errno.')');
    122             }
    123         } catch (Exception $e) {
    124             $config = acym_config();
    125             $reportPath = $config->get('cron_savepath');
    126             if (!empty($reportPath)) {
    127                 $reportPath = str_replace(['{year}', '{month}'], [date('Y'), date('m')], $reportPath);
    128                 $reportPath = acym_cleanPath(ACYM_ROOT.trim(html_entity_decode($reportPath)));
    129                 acym_createDir(dirname($reportPath), true, true);
     127        foreach ($handles as $handle) {
     128            curl_multi_remove_handle($mh, $handle);
     129            curl_close($handle);
     130        }
     131        curl_multi_close($mh);
     132    } catch (Exception $e) {
     133        $config = acym_config();
     134        $reportPath = $config->get('cron_savepath');
     135        if (!empty($reportPath)) {
     136            $reportPath = str_replace(['{year}', '{month}'], [date('Y'), date('m')], $reportPath);
     137            $reportPath = acym_cleanPath(ACYM_ROOT.trim(html_entity_decode($reportPath)));
     138            acym_createDir(dirname($reportPath), true, true);
    130139
    131                 $lr = "\r\n";
    132                 file_put_contents(
    133                     $reportPath,
    134                     $lr.$lr.'********************     '.acym_getDate(
    135                         time()
    136                     ).'     ********************'.$lr.'An error occurred while calling the queue sending script, please make sure the PHP function "fsockopen" is activated on your server: '.$e->getMessage(
    137                     ),
    138                     FILE_APPEND
    139                 );
    140             }
     140            $lr = "\r\n";
     141            file_put_contents(
     142                $reportPath,
     143                $lr.$lr.'********************     '.acym_getDate(
     144                    time()
     145                ).'     ********************'.$lr.'An error occurred while calling the queue sending script, please make sure the PHP function "curl_multi_exec" is activated on your server: '.$e->getMessage(
     146                ),
     147                FILE_APPEND
     148            );
    141149        }
    142150    }
  • acymailing/trunk/index.php

    r3398232 r3398904  
    66 * Author URI: https://www.acymailing.com
    77 * License: GPLv3
    8  * Version: 10.6.3
     8 * Version: 10.6.4
    99 * Text Domain: acymailing
    1010 * Domain Path: /language
  • acymailing/trunk/language/acymailing.pot

    r3398232 r3398904  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: AcyMailing 10.6.3\n"
     3"Project-Id-Version: AcyMailing 10.6.4\n"
    44"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/acymailing\n"
    55"MIME-Version: 1.0\n"
    66"Content-Type: text/plain; charset=UTF-8\n"
    77"Content-Transfer-Encoding: 8bit\n"
    8 "POT-Creation-Date: 2025-11-18\n"
     8"POT-Creation-Date: 2025-11-19\n"
    99"X-Domain: acymailing\n"
    1010
  • acymailing/trunk/language/en-US.com_acym.ini

    r3398232 r3398904  
    1 ACYM_VERSION="10.6.3"
     1ACYM_VERSION="10.6.4"
    22
    33
  • acymailing/trunk/readme.txt

    r3398232 r3398904  
    44Requires at least: 5.5
    55Tested up to: 6.8
    6 Stable tag: 10.6.3
     6Stable tag: 10.6.4
    77Requires PHP: 7.4.0
    88License: GPLv3
     
    114114== Changelog ==
    115115
    116 = 10.6.3 - November 18, 2025 =
    117 * The license is now correctly recognized when switching to another license key while in expired free trial period.
    118 * We fixed an issue related to the attachments included in sent emails.
     116= 10.6.4 - November 19, 2025 =
     117* Automation emails sent to admins can now contain information from the user that triggered the automation.
     118
     119* The saving of campaign settings has been fixed when using segments and send frequencies.
     120* The automated emails sending now correctly handles servers with slow connection.
    119121
    120122[See the whole changelog here.](https://www.acymailing.com/changelog)
  • acymailing/trunk/vendor/composer/installed.php

    r3398232 r3398904  
    44        'pretty_version' => 'dev-develop',
    55        'version' => 'dev-develop',
    6         'reference' => 'a30e87f4a38ebc9fbbf1669781dc0c7d29a00f1a',
     6        'reference' => '6af10f311e36a1c05b5876e5a6cc48c8c490032f',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-develop',
    1515            'version' => 'dev-develop',
    16             'reference' => 'a30e87f4a38ebc9fbbf1669781dc0c7d29a00f1a',
     16            'reference' => '6af10f311e36a1c05b5876e5a6cc48c8c490032f',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.