Hello i just wanted to ask is there a way that i can add a cool down timer to my sites sendmail.php and subscribe.php file as i have done a test with Vega and it spams my email address with around 250+ emails which is very bad and will / can be abused very easily and hence i would like to add some sort of protection.
I'm not sure what to currently try doing as im quite new to all this and some help would be very appreciated
Thanks and i hope to fix this.
You could create a little database table, and every time your program wants to send an email, you could have it check the database for the last time an email was actually sent, and then if that time was, for example, less than 5 minutes ago, then it will write the contents of the proposed email to a file named similarly to the target email address (example example.com.txt for the address example@example.com where the space is replaced by the @ sign to derive the address), and when the server wants to send an email again, it will dump all of the proposed messages into the message, send the email and clear the text file. After that, it would store the current timestamp into the database row associated with that email address, or create a new row if no such row exists. Hope this helps. A little difficult to comprehend, so sorry. It just kind of ended up that way...