从我的网站发送给会员的邮件显示为垃圾邮件

发布于 2024-12-05 01:30:05 字数 732 浏览 0 评论 0原文

我有一个网站,我想通过电子邮件将活动代码发送给我的新会员。我也有一个唯一的IP,但是当我用PHP中的“邮件”功能发送电子邮件时,该电子邮件会出现在他们的垃圾邮件中。我如何向我的会员发送收件箱中显示的电子邮件?

$headers = "From: [email protected]\r\n";
$headers .= "Reply-To: [email protected]\r\n";

if ( mail("[email protected]","Test","Hello,world !",$headers) ) {
   echo "The email has been sent!";
   } else {
   echo "The email has failed!";
   }

I have a site and I want to email the active code to my new members. I have an unique IP too, but when I send an email with "Mail" function in PHP, the email would appear on their Spam. How can I send the email to my members that appear on their Inbox??

$headers = "From: [email protected]\r\n";
$headers .= "Reply-To: [email protected]\r\n";

if ( mail("[email protected]","Test","Hello,world !",$headers) ) {
   echo "The email has been sent!";
   } else {
   echo "The email has failed!";
   }

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

祁梦 2024-12-12 01:30:06

大多数电子邮件主机都有一个在收到的电子邮件中支持“普通文本”的系统。任何类型的带有不寻常字母的电子邮件都更有可能进入垃圾邮件过滤器。尝试看看您发送给他们的电子邮件实际上是什么样子,看看是否有任何可能看起来“不寻常”的东西。

Most email hosts, have a system which favor "Normal text", in received e-mails. Any type of emails with unusual letters have a greater tendency of ending up in the spam-filter. Try to take a look at what the e-mail your sending them actually looks like, and see if there's anything that might appear "unusual".

独守阴晴ぅ圆缺 2024-12-12 01:30:06

试试这个...

$to = "[email protected]";
$subject = "Put Subject Here";
$message = "Put at least a paragraph of text";
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html\r\n";
$headers .= "X-Mailer: PHP/" . phpversion() . "\r\n";
$headers .= "From: [email protected]\r\n";
$headers .= "Reply-To: [email protected]\r\n";

if ( mail($to,$subject,$message,$headers) ) {
    echo "The email has been sent!";
} else {
    echo "The email has failed!";
}

确保发送电子邮件的电子邮件地址存在。

Try this...

$to = "[email protected]";
$subject = "Put Subject Here";
$message = "Put at least a paragraph of text";
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html\r\n";
$headers .= "X-Mailer: PHP/" . phpversion() . "\r\n";
$headers .= "From: [email protected]\r\n";
$headers .= "Reply-To: [email protected]\r\n";

if ( mail($to,$subject,$message,$headers) ) {
    echo "The email has been sent!";
} else {
    echo "The email has failed!";
}

Make sure that the email address that the emails are being sent from, exists.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文