我正在使用 html 表单 textarea 和 php 通过我的网站发送电子邮件
如何在邮件正文中放置链接。我喜欢这个
<a href="http://www.xxxxx.com/">Visit the site</a>
但我收到的是全文。我也试过了
<html>
<head>
<title>Test</title>
</head>
<body>
<a href="http://www.xxxxx.com/">Visit the site</a>
</body>
</html>
但我收到的是全文
最佳答案
确保正确添加标题
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
关于php - 在 php 发送的电子邮件中发送 html 链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15826283/