 | |  | | | Classifieds How do I...? Wondering how to do something in Classifieds? |
January 16th, 2011, 05:24 PM
|
#1 (permalink)
| | Member Verified Customer
Join Date: Jan 2008
Posts: 121
| Massive email remiders being sent
Chuck,
I am running Classified version 4.1 downloaded 10.22.10 and installed on a vB 4.1.1 board.
My members are getting massive emails reminders (30-40) at onetime telling them that their ad will be expiring in 3 days. The emails wont stop and they are getting flooded with them. This happens multiple times a day to the same members. What the heck is going on here? I need your help and thanks in advance.
WD
|
| |
January 16th, 2011, 05:26 PM
|
#2 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,069
|
well I dont see in the code how that can happen as the email can only be sent about an ad once a day.
what type of cron do you use sendnotice.php or cron.php ie footer or cron task?
|
| |
January 16th, 2011, 06:23 PM
|
#3 (permalink)
| | Member Verified Customer
Join Date: Jan 2008
Posts: 121
|
Chuck
I dunno how this is happening either, but I know I am getting some unhappy members. Most didn't renew their ad because of it and just deleted it.
Answer to your question, I am using cron.php ie footer or cron task.
|
| |
January 16th, 2011, 06:56 PM
|
#4 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,069
|
You can send your site data through the contact us link and I can take a look to see if I see anything.
Basically from the code standpoint the way it works is the cron runs every 15mins as an example if thats how often you run the cron. It could theoretically if not coded right send out an email every 15 for every ad that would expire within 3 days. However we explicitly code that an email can only be sent once a day about any individual ad. The conditional is clearly coded to only allow email to be sent out once a day like so Code: Content visible to verified customers only.
It is simple math. I would suspect possibly your server not allow or be set to allow time format in a way that is backward compatible with most all php 3 4 and 5 installs. I know some newer php 5 installs may get a little strict.
Do this in your sendnotice.php file and cron.php file. Above the lines noted above add this line Code: Content visible to verified customers only.
|
| |
January 16th, 2011, 07:23 PM
|
#5 (permalink)
| | Member Verified Customer
Join Date: Jan 2008
Posts: 121
|
I added the code as you suggested.
Do you want both my cpanel and website login info?
|
| |
January 16th, 2011, 08:19 PM
|
#6 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,069
|
If you added that code you would need to wait and see if it helped.
You can send that info but no need until you know the answer.
|
| |
February 7th, 2011, 09:39 AM
|
#7 (permalink)
| | Member Verified Customer
Join Date: Jan 2008
Posts: 121
| Quote:
Originally Posted by Chuck S If you added that code you would need to wait and see if it helped.
You can send that info but no need until you know the answer. | Hey Chuck
The code didn't help, my members are still getting multiple email reminders.
|
| |
February 7th, 2011, 10:04 AM
|
#8 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,069
|
I can look at your setup but as stated the code is pretty specific as I have posted the emails can ONLY be sent once a day. Thats how often I get them I tested this myself.
Maybe you have a database problem maybe an update is missing. If you use phpmyadmin and view your cp_stats and what number is in the lastupdate field of that table?
You can see my code posted in post for but lets explain that code again. Basically what that code does is make sure an email is only sent once a day no matter how often you run your cron task. 86400 is 24 hours. So what that if clause states is we query the lastupdate field in your stats table which is the last time the cron was ran and calculate the time difference between the last time cron task ran versus the time right now. That is simple math and if the time difference is over 86399 then we send an email. So the only way your going to get an issue I would think is if your lastupdate field in your stats table is not being updated or does not exist meaning you could have missed an upgrade.
|
| |
February 7th, 2011, 10:15 AM
|
#9 (permalink)
| | Member Verified Customer
Join Date: Jan 2008
Posts: 121
| Quote:
Originally Posted by Chuck S I can look at your setup but as stated the code is pretty specific as I have posted the emails can ONLY be sent once a day. Thats how often I get them I tested this myself.
Maybe you have a database problem maybe an update is missing. If you use phpmyadmin and view your cp_stats and what number is in the lastupdate field of that table?
You can see my code posted in post for but lets explain that code again. Basically what that code does is make sure an email is only sent once a day no matter how often you run your cron task. 86400 is 24 hours. So what that if clause states is we query the lastupdate field in your stats table which is the last time the cron was ran and calculate the time difference between the last time cron task ran versus the time right now. That is simple math and if the time difference is over 86399 then we send an email. So the only way your going to get an issue I would think is if your lastupdate field in your stats table is not being updated or does not exist meaning you could have missed an upgrade. | Chuck,
I don't mind if it sends a reminder more than once a day, it's sending 15 or more emails to the same person all at once (like getting spammed) this is what is ticking off the members.
The code in cp_stats for lastupdate is int(12)
If you want I will send you cpanel login info via contact us form.
|
| |
February 7th, 2011, 11:13 AM
|
#10 (permalink)
| | Member Verified Customer
Join Date: Jan 2008
Posts: 121
|
Chuck
One of my members just emailed me and said he has received close to 60 email reminders today about his ad.
Is there anyway to turn off the email notifications? Christ I hate to do that as members ads will get deleted with out them knowing but I'm tired of hearing about EMAILS out the ying yang!
I haven't made any changes to classified code and I don't know why it is sending so many damn emails?
|
| |
February 7th, 2011, 12:04 PM
|
#11 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,069
|
Hello
You can definately choose to not expire your ads if you do not run the cron and you can hand run it once a day etc.
You can also only elect to run the cron once a day in the admin panel as well. Your choosing to run it every 15 minutes or so and if your script is not calculating time correctly as I have been stated this can lead to multiple emails being sent but I would need to see your database and files.
You can send whatever data you wish through the contact us link.
|
| |
February 7th, 2011, 12:37 PM
|
#12 (permalink)
| | Member Verified Customer
Join Date: Jan 2008
Posts: 121
|
Chuck I have my cron set for every 30 minutes, but I turned the cron to off an hour ago to stop the emails from being sent.
I am sending you login info for website and cpanel via your company contact form. Would you please look and see what is going on with my website.
Thank you
WD
|
| |
February 7th, 2011, 01:04 PM
|
#13 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,069
|
I would suspect a n issue with the lastupdate field personally
|
| |
February 7th, 2011, 02:01 PM
|
#14 (permalink)
| | Member Verified Customer
Join Date: Jan 2008
Posts: 121
|
Chuck
Did you get my login info ok?
|
| |
February 7th, 2011, 02:09 PM
|
#15 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,069
|
I will go check it wasnt there when I checked earlier but it can take time.
|
| |
February 7th, 2011, 02:30 PM
|
#16 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,069
|
You where missing your stats table insert
|
| |
February 7th, 2011, 03:24 PM
|
#17 (permalink)
| | Member Verified Customer
Join Date: Jan 2008
Posts: 121
| Quote:
Originally Posted by Chuck S You where missing your stats table insert | Chuck
I don't understand that or how this is happening. You were just in my DB last week and you said the stats table insert was missing when I was having problems with sold items and dollar amount showing in the statistics.
I see you turned the cron back on and set time for 86400, so this means the cron will run once a day?
|
| |
February 7th, 2011, 03:40 PM
|
#18 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,069
|
86400 is once per say you can place if you want you wish. Your issue was your stats table did not have your stats table insert.
|
| |
February 9th, 2011, 04:50 PM
|
#19 (permalink)
| | Member Verified Customer
Join Date: Jan 2008
Posts: 121
|
Okay and thanks a bunch Chuck, everything working normal with emails.
However I have another problem I will post in a different thread.
|
| |
February 10th, 2011, 07:31 AM
|
#20 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,069
|
yes your other problem is just a result of not being able to update queries and now you can.
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -5. The time now is 07:06 AM. | |