Posted on 2006-05-18
Last Modified: 2008-02-26
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
$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 <>\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 .= '';                        
Question by:craig007
    LVL 49

    Expert Comment

    Try using a mailer class like phpmailer (

    LVL 40

    Expert Comment

    Try chaning ...

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


    $headers = "MIME-Version: 1.0;\r\nContent-type: text/html;\r\ncharset=iso-8859-1;\r\n";

    Author Comment

    I have find the answer

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

    $From\r\nContent-type: text/html; charset=us-ascii");

    Accepted Solution

    PAQed with points refunded (250)

    Community Support Moderator

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Suggested Solutions

    The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
    Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now