Campaigns set up to go out at different days via autoresponder, some weeks and months later but they go all at the same time

I use a cron to send them, I have looked at the setup like draft mode and it all looks OK but when someone signs up they get all of them on the same day. This is applicable to all of the autoresponders. Any ideas what could be wrong? I have the latest versions of everything.

@dashton Can you show a screenshot of the Manage Autoresponders page that shows the problem?

Are you using the plugin for the first time, or has it been working and now does not work properly?

(I sent the following via reply email - just in case it went to spam I’ve decided to also reply here)
Hi Duncan,

I’ve been using PHPList and your plugin for around 1 year when Sendreach went under and another one I was using decided to no longer support upgrades, I was very thankful for finding PHPList as 20+ years having my own website I’d never heard of PHPList.

I had problems at the beginning getting the cron to work, that was sorted eventually after a few months but I don’t believe that is causing the issue.

When I 1st realised this was happening, I thought it was just me testing, because I’d delete my email that I subscribed and resubscribe during my testing / learning phase.

There may have been this problem from day one because the cron job wasn’t working (when I thought it was). When I had the cron job finally working the emails would come out all at once, rather than drip out as per the auto responder schedules.

So I ignored the issue until today because I thought it was related to my resubscribing the same email.

Something made me decide to test out one of my campaigns with 13 emails (yep I got all 13 at once) and this one (4 only) with a brand new email address, so I realised this wasn’t related to using the same email address.

I have attached a screenshot of the manage auto responders page, you’ll notice the days they are meant to come out and then the other screenshot from my email client, all 4 came at the same time. I didn’t save the larger campaign (the 13 email one) I deleted all the emails but would be able to reproduce it if need be.

I’ve gone over the instructions heaps of times to see if I have missed something or did something wrong.

There is no way I’d say I’m an expert, but I’m not a novice to computers so I hope I am not wasting your time. I like PHPList seeing it is free and thank you for your plugin as it is easy to understand.

All emails are draft and not queued up etc. I have many lists so is that the issue? Only 1 list per installation? (I doubt this is the answer).

Hoping you can help, what can I send you?

@dashton Thanks. So the email address that is shown in the email client was definitely new in phplist?
Do you mind repeating the test, but first delete that email address from phplist by finding it on the Subscribers page.

Also, can you enable some logging by adding this to the end of the config.php file.

You will need to identify or create a temporary directory for the log file. Any directory that the web server can write to is fine. If there is a $tmpdir variable in config.php then you can use that, otherwise if you are not sure how to do this then leave it.

$log_options = [
    'dir' => '/path/to/temporary/directory',
    'threshold' => 'DEBUG',
    'classes' => [
        'phpList\plugin\Common\DB' => true,
        'Autoresponder' => true,

OK done all that. All the emails are still being sent. Created the path to the ‘dir’ as “/tmp”. What am I looking for to send you?

@dashton There should be a file named log_2022_11_24.txt in that directory. Can you either add it here if you do not mind it being public or send it to me in a personal message - click my icon to do that.

@dashton Your problem sounds similar to one mentioned in an earlier issue. The paragraph about sending all campaigs at once. I didn’t really resolve that because I found the cause of his original problem of sending only one email at a time.

How are you processing the queue when using a cron job? Is it by a command line or is it using the remote processing approach?

I believe it is commandline

/usr/local/bin/php /home/maitland/public_html/ -p processqueue -c /home/maitland/public_html/

I got pretty good at this technical side of things when I was trying to work out why emails weren’t being sent automatically. (At least I think I did for someone who is self taught at everything web, but I admit I’m not an expert).

Not sure this is my issue having had a quick glance, but thank you I’ll delve deeper asap.

Back to the original question:

I’m having trouble locating the file. Screenshot of settings I’ve done in config file attached.

Noting the path above for the commandline, where is this /tmp folder supposed to be located? as having trouble locating it. Note I didn’t create the folder, I noted that the system already had /tmp in the config file and changed the coding you sent to me. (assumed there was a tmp folder somewhere).

Using the

@dashton That is probably the system temp directory which you might not have access to. If you are using CPanel then there might be a /home/xxx/tmp directory, you can use that instead. Otherwise create a directory within /home/xxx.

Hi Duncan,

Finally got the tmp folder sorted.

Not allowed to upload txt files so hopefully you can download it from my onedrive.

@dashton Thanks.
Are you using any other plugins or the phplist requeue or repeat processing for campaings?

I can see that subscriber id 56 was ready to be sent autoresponder 17/campaign 17 in processqueue running at 19:50 but that repeats for the processqueue at 19:55 and 20:00. Are you able to see whether the run of processqueue at 19:50 did indeed send the campaign or whether something else happened to stop that?

There is nothing in the log to show that the campaigns for autoresponders 18, 19, or 20 were submitted to be sent.
Can you see what the status of those campaigns is within phplist?

@dashton I think that you are using the Segment plugin. That plugin and Autoresponder do not work together. You can use one of them on an individual campaign, but not both on the same campaign.
Check the Segment tab of the problematic campaigns and remove any segment conditions.

Attached is the list of plugins. I’ve never used the segment plugin although active. I disabled it and they still were all sent at the same time. I’ve discovered something, the emails were put into the active role, and the requeue was every hour. I didn’t put that setting in of requeue it was “do not requeue” when set up is there a plugin that changes this setting or does the cron job do it? When I manually made all the campaigns back to draft the emails came out as per the original autoresponder. Any advice here to what is changing the campaigns? I noticed that the first email is now in the sent segment - the autoresponder would move it back to draft?

@dashton Thanks for all this feedback, it has helped me to find a gap in the processing by the plugin.

If a campaign is submitted or requeued manually then the plugin might not deal with it correctly. The logic of the plugin is that it will requeue a campaign only when there is at least one subscriber ready to be sent and assumes that if there are no subscribers ready then the campaign won’t be requeued by any other means.

When processing the queue after requeuing manually, if there are some subscribers ready to be sent then that is handled correctly, but if there aren’t any ready subscribers then phplist will send the campaign to any new list members regardless of the autoresponder.

I think that is what was happening to you. Adding a subscriber to the list caused the first autoresponder to run correctly, but the later autoresponders were also sent incorrectly. This happened because the campaign was shown on the Active tab. I don’t know why that had happened though.
Can you look at the Event Log page to see whether phplist reported anything for those campaigns when sending.

I’ll shortly release a new version of the plugin to avoid this problem.

The Segment plugin probably exacerbated the problem rather than causing it, but it is best to leave it disabled.

The “usual” state for an autoresponder campaign is to be on the Sent tab after it has been sent to the first subscriber, and on the Draft tab until that has happened. It should appear on the Active tab only while phplist is sending the campaign emails.

You can stop the logging by removing the change made to config.php or simply changing DEBUG to OFF.

@dashton There is a new version of the plugin that fixes this problem. You can update on the Manage Plugins page to version 3.6.0.

Thanks Duncan. I’ve downloaded the update, turned off segment, changed debug to off and now attach the log entry. I’ve never really looked at the log entry for anything, just browsed for curiosity, so not sure if anything is out of the ordinary, just looks like that the cron was doing it’s job with no errors. 17 was the 1st autoresponder / campaign in this list I was using for testing - so hopefully the update everything is good. I also noticed the autoresponder had now moved the sent “17” back into drafts as expected. I believe you are right - from memory, the autoresponder worked for any list I signed up as I was testing “but live testing” but then later on heaps came out all on the same day.

From the event log it appears that only campaign 17 was sent, not the later autoresponders. Is that the case?

The campaign 17 should now be on the Sent tab, not Drafts.

At the bottom of your screenshot of the Event Log is an entry from the previous run, saying “No subscribers found to send to”. Can you see which campaign that applies to? The plugin should requeue a campaign only when there are subscribers to send to, so this message might mean something else is wrong.

Also, would you be able to give me temporary access to your phplist, to look at the event log and the campaigns directly? If so, send me a personal message with the access details.