mail() adding spaces to url in body of email

the mail() function

Moderators: egami, macek, gesf

Post Reply
User avatar
New php-forum User
New php-forum User
Posts: 137
Joined: Wed Aug 31, 2011 3:55 am
Location: USA

Tue Sep 27, 2011 3:34 pm

Try this below and I will all so need to see what your DOMAIN_URL looks like too

Code: Select all

 function sendWelcome($user, $email, $pass){
 $headers = "From: ".EMAIL_FROM_NAME." <".EMAIL_FROM_ADDR.">";
 $headers .= "MIME-Version: 1.0";
 $headers .= "Content-Type: text/html; charset=ISO-8859-1";
 $subject = "Welcome";
$body = <<<HTML
Hey ".$user.",<br /><br />
Congratulations! You are now officially part of the community.<br />
Username: ".$user."<br /><br />"
Password: ".$pass."<br /><br />
<a href=".DOMAIN_URL."?action=login">Click</a><br />
here to login and begin posting.</a>
Enjoy!<br /><br />
Thank you for choosing us!<br /><br />
return mail($email,$subject,$body,$headers);


Post Reply