- Code: Select all
function sendWelcome($user, $email, $pass){
$headers = "From: ".EMAIL_FROM_NAME." <".EMAIL_FROM_ADDR.">\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$subject = "Welcome";
$body = "<html><body>"
."Hey ".$user.",<br /><br />"
."Congratulations! You are now officially part of the community. "
."Username: ".$user."<br /><br />"
."Password: ".$pass."<br /><br />"
."<a href=\"".DOMAIN_URL."?action=login\">Click "
."here to login and begin posting.</a> "
."Enjoy!<br /><br />"
."Thank you for choosing us!<br /><br />"
."</body></html>";
return mail($email,$subject,$body,$headers);
There is some more unimportant text that comes along with it, but this is the gist of how it's structured.
The problem, when I get the emails in my inbox, the URL i'm getting the following as the href for my URL:
http://www.goog%20%20le.com/?action=login
Any idea why the spaces are getting put in there? I have DOMAIN_URL defined as "http://www.google.com"
It's strange that these space characters are coming in here, as I use this method with other emails and there is not an issue.

