WordPress.org

Forums

Javelin Email Marketing
Autoresponder don't send newsletter (4 posts)

  1. farfarella
    Member
    Posted 1 year ago #

    Hi, I have a problem with sending the newsletter. Confirmation emails are sent, even the broadcast mail, but sequential autoresponder's emails are not sent. What can be the problem? I have the latest version of this plugin. Please, help me.

    http://wordpress.org/extend/plugins/wp-responder-email-autoresponder-and-newsletter-plugin/

  2. andaluzo
    Member
    Posted 1 year ago #

    Hi,
    could you find a solution?

    I have the same Problem here, Hopefully Raj would give us some input on that.

  3. andaluzo
    Member
    Posted 1 year ago #

    It seams we are dealing with this part of the code

    /*
     * This is the function that performs the autoresponder subscription processing
     */
    
    class WPRBackgroundProcessor {
    
        public static function autoresponder_process_subscriber($subscriber_id) {
    
            $getAutoresponderSubscriptionQuery = sprintf("SELECT * FROM {$wpdb->prefix}wpr_followup_subscriptions subscription, {$wpdb->prefix}wpr_subscribers subscribers WHERE
                                                                    subscription.sid=%d AND
                                                                    subscribers.id=subscription.sid AND
                                                                    subscribers.active=1 AND subscribers.confirmed=1;", $subscriber_id);
    
            $subscriptionResults = $wpdb->get_results($getAutoresponderSubscriptionQuery);
    
            if (0 == count ($subscriptionResults)) {
                return;
            }
    
        }
    
        public static function process_autoresponders() {
    
            $processor = AutoresponderProcessor::getProcessor();
            set_time_limit(WPR_MAX_AUTORESPONDER_PROCESS_EXECUTION_TIME);
    
            $timeOfStart = time();
            $currentTime = new DateTime(sprintf("@%d", $timeOfStart));
    
            $timeWhenAutoresponderProcessLastDidAHeartBeat = get_option("_wpr_autoresponder_process_status");
            if (self::whetherAnotherInstanceIsAlreadyRunning($timeOfStart, $timeWhenAutoresponderProcessLastDidAHeartBeat)) {
                return;
            }
    
            //set the time of ping for the autoresponder process status variable
            update_option("_wpr_autoresponder_process_status",$timeOfStart);
    
            //set the start time of the autoresponder process
            do_action("_wpr_autoresponder_process_start", $currentTime);
    
            //run the autoresponder processor
    
            $processor->run_for_time($currentTime);
    
            //call the hooks that need notification for the
            do_action('_wpr_autoresponder_process_end', $currentTime);
            update_option("_wpr_autoresponder_process_status","stopped");
    
        }
    
        public static function whetherAnotherInstanceIsAlreadyRunning($timeOfStart, $timeWhenAutoresponderProcessLastDidAHeartBeat)
        {
            $timeMaximumExecutionTimeAgo = $timeOfStart - WPR_MAX_AUTORESPONDER_PROCESS_EXECUTION_TIME;
            if (!empty($timeWhenAutoresponderProcessLastDidAHeartBeat) && $timeWhenAutoresponderProcessLastDidAHeartBeat != "stopped") {
                $timeWhenAutoresponderProcessLastDidAHeartBeat = intval($timeWhenAutoresponderProcessLastDidAHeartBeat);
                if ($timeWhenAutoresponderProcessLastDidAHeartBeat != 0 && (self::whetherLastAutoresponderProcessHeartBeatValidityExpired($timeWhenAutoresponderProcessLastDidAHeartBeat, $timeMaximumExecutionTimeAgo))) {
                    return true;
                }
            }
    
            return false;
        }
    
        private static function whetherLastAutoresponderProcessHeartBeatValidityExpired($timeWhenAutoresponderProcessLastDidAHeartBeat, $timeMaximumExecutionTimeAgo)
        {
            return !($timeWhenAutoresponderProcessLastDidAHeartBeat < $timeMaximumExecutionTimeAgo);
        }
    
    }

    Anyone got a Idea how to fix it :)

  4. nodesman
    Member
    Plugin Author

    Posted 1 year ago #

    If you continue to face this problem, please email me here: raj@nodesman.com

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic