[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 236
  • Last Modified:

Hyprelinks

The send mail code below is work fine with all hyperlink and breaks showing, if i send it to my tiscali email addess. The email address is change my work address the hyperlink and break do not show and because this part of the website send out password to work people this is a problem. all the staff use outlook to get there emails but outlook same to be teating it as plain text any help would be great

//Send mail to user
if (isSet($_POST["email"])) { // && Validation::valEmail($_POST["email"])
$to = $_POST["forename"] . " " . $_POST["surname"] . " <". $_POST["email"] . ">";
$subject = "Username and password for the test website administration
system";
$headers = "MIME-Version: 1.0; Content-type: text/html; charset=iso-8859-1";
$headers .= "To: ".$_POST["forename"] . " " . $_POST["surname"] . " <".
$_POST["email"] . ">\r\n";
$headers .= "From: test <info@test.co.uk>\r\n";
$message  = "Dear ". $_POST["forename"] . " " . $_POST["surname"] . ", <br>";
$message .= "Your account for the test website administration system has
been created. <br><br>";
$message .= "Your login details are as follows:<br>";
$message .= "Username: ".$_POST["username"]."<br>";
$message .= "Password: ".$newPass."<br><br>";
$message .= "The address is: <br>";
$message .= '<a href="'.SITE_ADDRESS.'admin">'.SITE_ADDRESS.'admin</a><br><br>';
$message .= "Please login, and change your password immediately.<br><br>";
$message .= "Thank you, <br>";
$message .= "test website administration";
$message .= 'http://www.test.co.uk';                        
                        
0
craig007
Asked:
craig007
1 Solution
 
RoonaanCommented:
Try using a mailer class like phpmailer (phpmailer.sourceforge.net).

-r-
0
 
Richard QuadlingSenior Software DeverloperCommented:
Try chaning ...

$headers = "MIME-Version: 1.0; Content-type: text/html; charset=iso-8859-1";

to

$headers = "MIME-Version: 1.0;\r\nContent-type: text/html;\r\ncharset=iso-8859-1;\r\n";
0
 
craig007Author Commented:
I have find the answer


$mailSent = mail($to, $subject, $message, "From:$From\r\nReply-to:

$From\r\nContent-type: text/html; charset=us-ascii");
0
 
GranModCommented:
PAQed with points refunded (250)

GranMod
Community Support Moderator
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now