views:

65

answers:

3

I have my site under construction, and I want to have a little form (name, email) where people can submit it to be notified when I launch my site. Much like you see on Beta invite sites etc. How would I go about that?

+6  A: 

Have a HTML form with single email field. Name is not required and therefore should be avoided.

On database side, create a table with two fields: one to store email address and one boolean flag field (default false) to save status (if the notification is sent to this address or not). Make email address a unique field.

Two scripts:

  1. To save form entry to the database table. Basically a form handler.
  2. To select N email addresses and send a notification email to these. Then on successful completion of dispatch update the flag field against the email address to true. N is the upper limit of emails that your ISP allows during T time.

Make a cron job entry to run the mail sender script after every T units of time.

VarunGupta
A: 

in some situations the pear Net_SMTP class can be useful

--
dam

dam
A: 

Thanks a bunch! Though I honestly do not know what a cron job is. :) Any chance you can explain that a bit? Thanks!

thatryan
Refer, http://en.wikipedia.org/wiki/Cron
VarunGupta