mail() - >不起作用;抱怨“必须指定收件人姓名” [英] mail() -> doesn't work; complains "Recipient names must be specified"

查看:66
本文介绍了mail() - >不起作用;抱怨“必须指定收件人姓名”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好


Sendmail 8.12.11

php 4.3.9


Sendmail已安装并正常工作正确。

php不是安全模式

来自命令行的
;邮件 us**@domain.com < testmsg运行正常。


这是我正在尝试的代码..想法?


$ f ******** *******@soundwifi.net'';

$ t*******@yesterdayspc.com'';

$ subject =' '测试'';

$ body =`cat welcome.txt`;


#mail($ to,$ subject,$ body,$ from) ;

#print" $ result\\\
";

mail(to ** @ yesterdayspc.com,junk,这是身体,\

来自: wi ******** @ soundwifi.net ");


请注意我已经尝试过上面的两个邮件()函数同样的

结果...

Hi All

Sendmail 8.12.11
php 4.3.9

Sendmail is installed and works properly.
php is NOT in safemode

from the command line; mail us**@domain.com < testmsg works fine.

Here is the code that I am trying.. Ideas?

$f***************@soundwifi.net'';
$t*******@yesterdayspc.com'';
$subject=''Test'';
$body=`cat welcome.txt`;

# mail($to, $subject, $body, $from);
# print "$result\n";
mail("to**@yesterdayspc.com","junk","This is the body", \
"From: wi********@soundwifi.net");

Please note that I have tried BOTH mail() functions above with the same
results...

推荐答案

f *************** @ soundwifi.net'';
f***************@soundwifi.net'';


t ******* @ yesterdayspc.com'';
t*******@yesterdayspc.com'';


subject =''测试'' ;
subject=''Test'';


这篇关于mail() - &gt;不起作用;抱怨“必须指定收件人姓名”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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