Page 1 of 1

How to limit emails sent through php???

Posted: Sun May 18, 2003 9:35 pm
by HBAndrew
Hi, how do you limit how many emails can be sent through php scripts per day? Hosting company keeps getting email spam slowing the server down a lot, need to limit how many emails can be sent a day in each persons account, any help would be greatly apprechiated.

Thanks

Posted: Sun May 18, 2003 11:46 pm
by Doolittle
I would have a database keeping a daily count of emails... if its too many, they can't do it... then run something thats scheduled as a task to reset the database daily :)

Posted: Mon May 19, 2003 12:41 am
by HBAndrew
we need a solution for each user, each user will only be allowed to send something like 70 mails per day, quote from the forums:
The final question....which our admins are exploring in great detail already. How do we limit number of emails sent through php scripts.....it is easy to limit number of emails sent from and email address on the server...that has already been done..... but how do you limit emails sent through php?....Do you know anyone with a specific solution to this specific problem?
each user is limited to about 100 emails per day through email address, need to limit each user to certain amount of php mail, not set for all members, but a setting that will apply to each user individually, hope this can be done and hope it makes sense lol

any software able to do this? anything at all?

Thanks

Posted: Mon May 19, 2003 3:29 am
by HBAndrew
anyone??

Posted: Mon May 19, 2003 12:11 pm
by HBAndrew
bump

Posted: Mon May 19, 2003 12:16 pm
by mikusan
I totally agree with the database idea...i would add that you can have information for each user that includes an autoincrement value, a timestamp of when the first email was sent and then keep track of the entries...not too hard. You could also keep in mind that you could use sessions to do the same, but i store sessions in the database so we are still back to where we started...database is the way to go d00d.

Posted: Mon May 19, 2003 12:23 pm
by deejay
have you tried hotscripts.com or phpfreaks.com there might be something there.

I would have thought that it'd be fairly simple, but what you wont find here is someone to write it for you , you'll have to get your hands dirty and start the script off, and I'm sure you'd get some help tidying it up.

Posted: Mon May 19, 2003 3:53 pm
by HBAndrew
thx everyone