How to limit emails sent through php???

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
HBAndrew
Forum Newbie
Posts: 9
Joined: Wed Mar 26, 2003 12:23 am
Location: Southampton, UK

How to limit emails sent through php???

Post 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
Doolittle
Forum Newbie
Posts: 19
Joined: Sun May 04, 2003 11:45 pm

Post 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 :)
HBAndrew
Forum Newbie
Posts: 9
Joined: Wed Mar 26, 2003 12:23 am
Location: Southampton, UK

Post 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
HBAndrew
Forum Newbie
Posts: 9
Joined: Wed Mar 26, 2003 12:23 am
Location: Southampton, UK

Post by HBAndrew »

anyone??
HBAndrew
Forum Newbie
Posts: 9
Joined: Wed Mar 26, 2003 12:23 am
Location: Southampton, UK

Post by HBAndrew »

bump
Last edited by HBAndrew on Mon May 19, 2003 12:46 pm, edited 1 time in total.
User avatar
mikusan
Forum Contributor
Posts: 247
Joined: Thu May 01, 2003 1:48 pm

Post 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.
User avatar
deejay
Forum Contributor
Posts: 201
Joined: Wed Jan 22, 2003 3:33 am
Location: Cornwall

Post 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.
HBAndrew
Forum Newbie
Posts: 9
Joined: Wed Mar 26, 2003 12:23 am
Location: Southampton, UK

Post by HBAndrew »

thx everyone
Post Reply