Code: Select all
$toaddress = $_POST['email'];
$subject = 'Welcome to mysite.com';
$mailcontent = 'Welcome '.$fname."\n"
.'Your username is: '.$_POST['username']. "\n"
.'To begin, please login and begin setting up your profile'."\n";
$fromaddress = 'From: newaccounts@mysite.com';
mail($toaddress, $subject, $mailcontent, $fromaddress);
I tried this with no success: $mailcontent = 'Welcome '.$fname.'<br>'"\n"
Also, I would like to:
(1) get an email every time someone registers
(2) Add a clickable link back to my site to the mail content