【发布时间】:2015-11-19 23:07:38
【问题描述】:
我发送一封带有 php 表单的电子邮件。当用户键入链接并提交通过 html/text 发送的表单电子邮件但链接无效时,我有“消息”字段。如何设置链接处于活动状态?
$body = '<html><body>';
$body .= '<table width="770" border="1">';
$body .= '<tr><th colspan="2" bgcolor="#4e604a" scope="col" style="color: white">Order</th></tr>';
$body .= '<tr><td width="91" align="center" bgcolor="#D6D6D6"><strong>Name:</strong></td><td width="663"> ' . $name . ' </td></tr>';
$body .= '<tr><td align="center" bgcolor="#D6D6D6"><strong>Email:</strong></td><td> ' .$email . ' </td></tr>';
$body .= '<tr><td colspan="2" align="center" bgcolor="#4E604A" style="color: white"><strong>Message:</strong></td></tr>';
$body .= '<tr><td colspan="2" style="word-wrap: 80px"><pre style="font-size: 14px">' . $message . ' </pre></td></tr>';
$body .= '</table>';
$body .= '</body></html>';
(来源:fotkica.com)
【问题讨论】:
-
请发布 $message 变量内容。您是否将链接包装在 元素中?您是否以纯文本形式发送消息?
-
没有使用 html 发送邮件 $mailer->isHTML(TRUE); // 将电子邮件格式设置为 HTML $message = isset($_POST['message']) ? $_POST['message']:假;如何在 中包装链接?