在php生成的电子邮件中包含一个链接


include a link in an email generated by php

我试图包括一个链接在电子邮件是由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);

我显然错过了一些东西,但我不确定它是什么。由于

首先为HTML内容设置标题例子:

$headers .= "MIME-Version: 1.0'r'n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1'r'n";

然后添加这样的链接

<a href = "http://www.bookcellaronline.com/bcos/advances/buyertotal.php">Check In Details</a>

首先:不要使用mail()函数。使用一个特定的类,比如PHPMailer()。真的。别这么做。

缺少//这里:

<a href = http://www.bookcellaronline.com