Expiration email question

13 years 2 weeks ago #160847 by tto
Replied by tto on topic Re:Expiration email questi
Hello Aly,

I am not sure, but I think you will need AcyMailing Enterprise to enable the auto-filters feature to create the automatic reminders.

Regards,

Regards,

Tariq

Please Log in to join the conversation.

12 years 11 months ago - 12 years 11 months ago #162770 by cliffvt
Replied by cliffvt on topic Re:Expiration email questi
Hey Piston

Been using this script against 4 plans successfully as a cron job for the past 4 months (or so I thought!) :S

Today, when over 250 emails should have gone out for a 4 week expiration for 4 of the plans, the cron job ran ok but seems to have sent only ONE email for every plan - so it seems to have found the first record, sent the email and then stopped rather than executing the (while) statement (rest of the database). Do you know why this could be?

Also, is there a reason why in the $q= statement, this line is stated twice?:
"jos_cbsubs_subscriptions.user_id = jos_users.id" - it is stated at the beginning of the WHERE and at the second last line - just asking as I picked this up as I was trying to troubleshoot the script..

Hopefully you can help so I can re-run these scripts later today..

Cheers

Cliff

Please Log in to join the conversation.

12 years 11 months ago - 12 years 11 months ago #162803 by cliffvt
Replied by cliffvt on topic Re:Expiration email questi
Ahha! I think I found the culprit.

In your original script you have this line near the end:
return mail($recipient, $subject, $message, $headers);

I am no PHP expert but that "return" will have the effect of terminating the script I would have thought?

So I guess it should be changed to:
mail($recipient, $subject, $message, $headers);

so that the script can carry on executing the rest of the matching records in the database?

Comments?

Cheers

Cliff

Please Log in to join the conversation.

12 years 11 months ago #162833 by ThePiston
Replied by ThePiston on topic Re:Expiration email questi
to be honest, I do not know. which version of the script are you referring to? Can you link me to that post? It has changed a little here and there.

CB 2.3, CBsubs 4.3, PHP 7.1, J! 3.9.X

Please Log in to join the conversation.

12 years 6 months ago #178811 by aguaw
Replied by aguaw on topic Re:Expiration email questi
Hey ThePiston - thank you for doing this, is this the latest version of the script?

Please Log in to join the conversation.

12 years 6 months ago #178822 by ThePiston
Replied by ThePiston on topic Re:Expiration email questi
yep

CB 2.3, CBsubs 4.3, PHP 7.1, J! 3.9.X
The following user(s) said Thank You: aguaw

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.256 seconds