mail()没有到达hotmail [英] mail() not reaching hotmail

查看:100
本文介绍了mail()没有到达hotmail的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我正在尝试使用mail()函数发送简单的纯文本

消息。我有两个网站由同一家公司托管,在不同的

服务器上。一个是旧的并且已经建立,我正在开发一个。

我正在通过向与我的旧网站相关联的

电子邮件帐户发送测试消息来测试邮件功能,以及到我的hotmail

帐户。该消息似乎被发送到两个帐户,我在我的网站的电子邮件帐户上收到了消息,但它从未到达我的

hotmail帐户。 />

Hotmail是否需要特殊标头?我已经看了一下

,但似乎无法弄明白。我甚至尝试过

包括几个不同的标题,但总是有相同的结果

- 到达我网站的电子邮件帐户,但不是我的hotmail帐户。我用来测试的

代码是:


<?php


$ body =''来自互联网邮件管你好!'';

$ subject =''测试信息'';

$ address =''working_address@other_domain.com'';

$ address2 =''w**************@hotmail.com'';

$ headers ="来自:< a href =mailto:working_address@this_domain.com> working_address@this_domain.com " ;;


邮件($ address,$ subject,$ body,$ headers )或打印无法发送

到$地址。&;;

打印用$地址完成。< br>" ;;


邮件($ address2,$ subject,$ body,$ headers)或打印无法交付

到$ address2。" ;;

打印使用$ address2完成。< br>" ;;


?>

Hello everyone,

I am trying to use the mail() function to send a simple, text-only
message. I have two websites hosted by the same company, on different
servers. One is old and established, one I am currently developing.
I am testing the mail functionality by sending a test message to an
email account associated with my old website, and to my hotmail
account. The message seems to be sent to both accounts, and I receive
the message on my website''s email account, but it never reaches my
hotmail account.

Are there any special headers required for hotmail? I''ve looked
around a bit, and can''t seem to figure it out. I''ve even tried
including several different headers, but always with the same results
- reaches my website''s email account, but not my hotmail account. The
code I am using to test is:

<?php

$body = ''Hello from the internet mail tubes!'';
$subject = ''Test message'';
$address = ''working_address@other_domain.com'';
$address2 = ''w**************@hotmail.com'';
$headers = "From: working_address@this_domain.com";

mail($address, $subject, $body, $headers) or print "Can not deliver
to $address.";
print "Done with $address.<br>";

mail($address2, $subject, $body, $headers) or print "Can not deliver
to $address2.";
print "Done with $address2.<br>";

?>

推荐答案

body =''你好,来自互联网邮件管!'';
body = ''Hello from the internet mail tubes!'';


su bject =''测试信息'';
subject = ''Test message'';


address =''working_address@other_domain.com'';
address = ''working_address@other_domain.com'';


这篇关于mail()没有到达hotmail的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆