PHP 发 email。 急~~~

来源:百度知道 编辑:UC知道 时间:2024/06/10 19:00:19
邮件发到 $email1 $email2 两个油箱里面去
用户点一个键以后去到php文件,更新数据库
然后自动发一个邮件去用户油箱
变量有$sender $receiver(两个人的名字) $email1 $email2 (2个邮箱)
$t_id是从数据库读取的一个编号,将会作为邮件中的内容
发送人的是新浪邮箱

我调用mail函数,把php.ini里面的SMTP 改成了smtp.sina.com 端口是25 还是不行
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\htdocs\bsp\confirm.php on line 76

用phpmailer,出错
Warning: fputs(): supplied argument is not a valid stream resource in C:\xampp\htdocs\bsp\class.smtp.php on line 146

Warning: fgets(): supplied argument is not a valid stream resource in C:\xampp\htdocs\bsp\class.smtp.php on line 1024
Message could not be sent.
Mailer Error: Language string failed to load: from_failedepay_manager@sina.com

谁能帮我看看?或者提供下可用的代码 万分感谢

PHP的mail函数好多邮箱都收不到,一般可以用smtp协议来发邮件。
http://www.phpe.net/?n=Classes&t=12
这里有好几个用PHP发email的类下载,我是用Phpmailer来做的,支持Smtp