mail() adding spaces to url in body of email

the mail() function

Moderators: macek, egami, gesf

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

Re: mail() adding spaces to url in body of email

Post by bigjoe11a » 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
<html><body>
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 />
</body></html>
HTML;
return mail($email,$subject,$body,$headers);

}

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest