I have a registration feature on my website which uses PHP and MySQL. After a user registers, I would like an email sent to his or her address with a confirmation link. How can I build such an automatic emailing system? Thanks.
On signup, generate a random key and store in the database with that user. Use the PHP mail function to send an email to that user with a link like "http://www.site.com/verify.php?key={$key}&user={$username}". Proceed to make verify.php, where it checks to see that the $_GET['key'] matches with username in a MySQL query. If it's correct, modify that row of the user and set verified to true.