I have an website running, and what I want to do is create a Table that has listed all the email that need to be sent, with all the information in it. Example:
CREATE TABLE Send_Email
ID INT,
To VARCHAR(130),
Subject VARCHAR(130),
Message TEXT
What I want to do - and don't know how - is to check automatically if there is any record on this table, if there is: Send the email(s) and delete the row(s).
What I don't know is what is the concept when building something like this. Where to put it? How to check it automatically? Do I put the loop code on my main "master controller" and run it every time someone loads up one of my pages? This looks like it will affect performance.