我已经创建了 API 来用 PHP 发送邮件。下面是我的代码
$content = $content."<br/><b>Address : </b>".$fromUser["address"];
$content = $content."<br/><b>City : </b>".$fromUser["city"];
$to = '[email protected]';
include('PhpMailer/class.phpmailer.php');
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPAuth = TRUE;
$mail->SMTPSecure = "ssl";
$mail->Host = "smtp.gmail.com";
$mail->Port = 465;
$mail->Username = "####";
$mail->Password = "####";
$mail->setFrom("[email protected]","abc");
$mail->isHTML(true);
$mail->AddAddress($to);
$mail->Subject = 'Test';
$mail->MsgHTML($content);
if ($mail->Send()) {
return 1;
} else {
return 0;
}
我收到电子邮件,但内容中的关键字“城市”显示超链接。我想删除它。
[注意:如果我写“City1”而不是“City”,则链接将被删除]