$mailcontent formatting (line breaks, text color, bold etc.)
Posted: Sat Sep 26, 2009 11:48 am
I got a registration page that sends a welcome email and I have the basics down already
Now, I would like to spruce up the email message a bit (i.e. add bold to certain content elements, colored text, line breaks). How can I pull this off?
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
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