是的,比如用如下脚本发送邮件:<? #变量to,subject,body是从前一个页面直接获得,此脚本没有逻辑错误。 if(mail("$to", "$subject","$body")) print "OK! the mail to $to has been send<br>"; else print "fail to send mail <br>"; ?>邮件可以收到,但是发件人显示 [email protected],其中asterisk1.local是当前用户名,现在如何修改发送显示信息(比如显示为[email protected]),需要更改sendmail.cf吗?(本版本Linux已经内含了sendmail)
#变量to,subject,body是从前一个页面直接获得,此脚本没有逻辑错误。
if(mail("$to", "$subject","$body"))
print "OK! the mail to $to has been send<br>";
else
print "fail to send mail <br>";
?>邮件可以收到,但是发件人显示 [email protected],其中asterisk1.local是当前用户名,现在如何修改发送显示信息(比如显示为[email protected]),需要更改sendmail.cf吗?(本版本Linux已经内含了sendmail)
==>
if(mail("$to", "$subject","$body", "From: [email protected]"))
否则按照默认的