当网站所有者收到基于表单输入的电子邮件时,我希望有粗体标签......
像这样...
名称: $名称
电话: $电话
电子邮件地址: $email
等等等等……
但他们没有正确显示。
这是我设置电子邮件的方式...
$msg = "You have been contacted by $name with regards to $subject. Their message is as follows:";
$msg .= "" . PHP_EOL;//Line Break
$msg .= "Name:".$name . PHP_EOL . PHP_EOL;
$msg .= "Phone:".$phone . PHP_EOL . PHP_EOL;
$msg .= "Email Address:".$email . PHP_EOL . PHP_EOL;
$msg .= "Low Budget:".$budgetlow . PHP_EOL . PHP_EOL;
$msg .= "High Budget:".$budgethigh . PHP_EOL . PHP_EOL;
$msg .= "Venue Name:".$venuename . PHP_EOL . PHP_EOL;
$msg .= "Event Capacity:".$eventcapacity . PHP_EOL . PHP_EOL;
$msg .= "<strong>Event Description:</strong>".$eventdescription . PHP_EOL . PHP_EOL;
$msg .= "" . PHP_EOL . PHP_EOL; //Line Break
$msg .= "You can contact $name via email at $email or via phone at $phone." . PHP_EOL . PHP_EOL;
我希望标签以粗体显示。上面,我在事件描述中添加了标签来尝试加粗,但它没有加粗。
这是我设置标题的方式...
$headers = "From: $email" . PHP_EOL;
$headers .= "Reply-To: $email" . PHP_EOL;
$headers .= "MIME-Version: 1.0" . PHP_EOL;
$headers .= "Content-Type: text/plain; charset=us-ascii" . PHP_EOL;
$headers .= "Content-Transfer-Encoding: quoted-printable" . PHP_EOL;