使用PHP发送HTML邮件。 链接在Outlook中不起作用

I am using the following mail script.

 <?
 $mailer_returndir  = $_POST['returndir'];
 $mailer_receiver   = $_POST['mailer_receiver'];
 $mailer_subject        = $_POST['mailer_subject'];
 $mailer_extra_text     = str_replace("
","<br>",$_POST['mailer_extra_text']);
 $mailer_text_html  = $_POST['mailer_text_html'];
 $mailer_body       = "<span class='style1'>".$mailer_extra_text."<br><br></span>".$mailer_text_html;



    $bodyn1  ="<html xmlns='http://www.w3.org/1999/xhtml'>";
    $bodyn1 .="<head>";
    $bodyn1 .="<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />";
    $bodyn1 .="<title>MYSITE HEADER ".$datetd."</title>";

    $bodyn1 .="<style>.style1{color:#000;font-family:Arial,Helvetica,sans-serif;font-size:12px;}";              
    $bodyn1 .="</style>";

    $bodyn1 .="</head>";
    $bodyn1 .="<body class='style1'>";




                  $mtsubjectn       = "MYSITE Sizechart for ".$customer;


                  $mtbodyn           = "<h3>MYSITE - Sizechart - ".$file."</h3><br>";
                  $mtbodyn          .= "<table>";
                  $mtbodyn          .= "<tr><td width='110' valign='top'>Customer:</td><td>".$customer."</td></tr>";

                  $mtbodyn          .= "<tr><td></td><td>&nbsp;</td></tr>";
                  $mtbodyn          .= "<tr><td width='110' valign='top'>Item:</td><td>".$itemname."</td></tr>";
                  $mtbodyn          .= "<tr><td></td><td>&nbsp;</td></tr>";

                  $mtbodyn          .= "<tr><td width='110' valign='top'>Type:</td><td>".$type."</td></tr>";
                  $mtbodyn          .= "<tr><td></td><td>&nbsp;</td></tr>";

                  $mtbodyn          .= "<tr><td></td><td>Click the link below to view your quotation as a .xls file</td></tr>";
                  $mtbodyn          .= "<tr><td></td><td>&nbsp;</td></tr>";

                  $mtbodyn          .= "<tr><td valign='top'>Quotation File:</td>";
                  $mtbodyn          .= "<td>";
                  $mtbodyn          .= "<a href='MYSITE/DIR/sizechart/".$file.".xls'>";
                  $mtbodyn          .= "sizechart/".$file.".xls</a>";
                  $mtbodyn          .= "</td></tr>";
                  $mtbodyn          .= "<tr><td></td><td>&nbsp;</td></tr>";
                  $mtbodyn          .= "<tr><td></td><td>&nbsp;</td></tr>";

                  $mtbodyn          .= "<tr><td colspan='2' align='center'>www.MYSITE.com</td></tr>";
                  $mtbodyn          .= "<tr><td colspan='2' align='center'>This is an automatically generated email.</td></tr>";    


    $bodyn3  ="</body>";
    $bodyn3 .="</html>";

 $mailer_body       = $bodyn1.$mtbodyn.$bodyn3;


 mail($mailer_receiver,$mtsubjectn,$mailer_body,"From: MYSITE <MYEMAIL>
"."MIME-Version: 1.0
" .  
"Content-type: text/html; charset=utf-8");


 header("Location:".$mailer_returndir.".php");
 ?>

When I open the email in outlook and I have links in the body.

The links will be all escaped.

 Email output:

 MYSITE - Quotation - 2015-01-28

 Customer: ***** 

 Click the link below to view your quotation as a .pdf file 

 Quotation File: http://MYSITE/DIR/quotations/QT-143.pdf 


 www.MYSITE.com 
 This is an automatically generated email. 

In the address bar below, the link shows as follows:

 \'http://MYSITE/DIR/quotations/QT-143.pdf\'

How can this be avoided so the customer can click this link?

Even if it's bad HTML: Try not using a href='someUrl', but a href=someUrl.