我试图在由php生成的电子邮件中包含一个链接.我看过这里可以找到的例子,但我仍然无法让我的工作需要一些帮助.这是我有的:
//send email when pricing specs are done
$to = $email;
$subject = "Final Check In";
$headers = "From: Warehouse@bookcellaronline.com" . "\r\n" .
"CC: micahpartnerships@gmail.com,lreyes@bookcellaronline.com,jimd@bookcellaronline.com";
$body = "Greetings " .$name."!\nWe have completed checking in your latest shipment of books.\nCheck-In date was: " .$finaldate."\n
We checked in " .$count." books.\nA total of " .$notListed." books are not listed yet and have been set aside to be researched.\nComments: ".$comments. "\n
You will now be able to review your shipment details here : '<a href = http:www.bookcellaronline.com/bcos/advances/buyertotal.php>Check In Details</a>'. Use the Check-In date from above.\n
This is an automated email - do not reply to this email. If you have any questions or concerns, please contact your Manager or Abbie.\n";
$body = wordwrap($body,70);
mail($to, $subject, $body, $headers);
Run Code Online (Sandbox Code Playgroud)
我显然错过了一些东西,但我不确定它是什么.谢谢
首先设置标题,内容为HTML示例:
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
Run Code Online (Sandbox Code Playgroud)
然后添加这样的链接
<a href = "http://www.bookcellaronline.com/bcos/advances/buyertotal.php">Check In Details</a>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
90 次 |
| 最近记录: |