發送電子郵件時,我想顯示超鏈接值而不是整個href。 這是我的代碼在PHP郵件正文中只打印鏈接名稱不是整個href
if ($model->update(array('status')))
{
$body.="Your account has now been verified. Please, login and spiff up your profile and take a look at our ,";
$body.="<a href='https://contactcenters.com/page/58/?Advertisewithus'>sponsorship program</a>";
$body.="to start building your business!";
$email=$model->email;
mail($email,$subject,$body,$headers);
//----------------------------------------------------------//
$this->redirect($model->user_id);
}
我想給贊助的方案不是在郵件正文整個HREF。但每當我發送一封電子郵件使用它它打印<a href='https://contactcenters.com/page/58/?Advertisewithus'>sponsorship program</a>";
而不是Sposorship Program
我試圖在單引號內添加雙引號,但它沒有奏效。
你把它作爲'text'或'html'郵件? – Jurik
我實際上下注了文字。如果你使用PHPMailer添加:'$ mail-> IsHTML(true);'然而代碼似乎你不... – Moby04