作者PHP5 (Powered by Zend Engine2)
看板Web_Design
标题Re: [问题] 请问如何用网页寄送email
时间Sat Apr 26 09:24:31 2008
※ 引述《howdieturtle (^^!!)》之铭言:
: 请问各位大大
: 我想用网页寄email可以都会发生以下的讯息
: Failed to connect to mailserver at "mail.ntu.edu.tw" port 456
: , verify your "SMTP" and "smtp_port" setting in php.ini
: 我是用php写的,我的程式码为以下
: <?
: $to = "[email][email protected][/email]";
: $subject = "ZDNet Developer article";
: $msg = "I completely understand SMTP servers now!";
: $headers = "From: [email][email protected][/email]\r\nReply-To: [email][email protected][/email]";
: ini_set("SMTP","mail.ntu.edu.tw");
: ini_set("smtp_port","456");
: mail("$to", "$subject", "$msg", "$headers");
: echo "finished!";
: ?>
: 是不是还要加smtp的帐号密码呢
: 要怎麽加呢
: 可以恳请各位大大帮忙吗 > <
: 谢谢
你要用台大的 SMTP 寄的话 需要装 phpmailer
http://phpmailer.sf.net
台大的 SMTP server 是 smtps.ntu.edu.tw
有经过SSL, Port 是 465 哦
另外,phpmailer还需要设帐号/密码
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.112.245.58
1F:推 howdieturtle:谢谢各位大大~~我用FREESMTP这个软体架SERVER 04/27 02:04
2F:→ howdieturtle:已经可以用以上的例子寄信了~~感谢各位大大的意见 04/27 02:05