主機若沒有跑 mail service, 要用 PHP 透過其他 SMTP 來寄信,
Windows 下可以改 php.ini
[mail function]
SMTP = smtp_server
其他 UNIX 環境, 不支援上面的方法, 真怪.
大致有兩種做法:
1. 使用現成 Class, 如 PEAR::Net_SMTP, phpguru.org - SMTP class, 這些 Class 是透過 fsockopen() 的方式寄信
2. 裝 Light SMTP Agent, 如: mini_sendmail
然後改 php.ini 裡的 sendmail_path
sendmail_path = /usr/local/sbin/mini_sendmail -s smtp_server -t
[PHP] Send mail with remote SMTP server
Categories:
1 Comments
Leave a comment
Categories
Monthly Archives
- March 2009 (8)
- February 2009 (7)
- January 2009 (14)
- December 2008 (15)
- November 2008 (12)
- October 2008 (9)
- September 2008 (10)
- August 2008 (13)
- July 2008 (28)
- June 2008 (17)
- May 2008 (13)
- April 2008 (15)
- March 2008 (7)
- February 2008 (5)
- January 2008 (2)
- November 2007 (4)
- October 2007 (8)
- September 2007 (7)
- August 2007 (3)
- July 2007 (10)
- June 2007 (4)
- May 2007 (5)
- April 2007 (9)
- March 2007 (11)
- February 2007 (7)
- January 2007 (4)
- December 2006 (9)
- November 2006 (14)
- October 2006 (10)
- September 2006 (9)
- August 2006 (6)
- July 2006 (15)
- June 2006 (22)
- May 2006 (17)
- April 2006 (13)
- March 2006 (18)
- February 2006 (10)
- January 2006 (28)
- December 2005 (17)
- November 2005 (15)
- October 2005 (18)
- September 2005 (24)
- August 2005 (39)
- July 2005 (14)
- June 2005 (22)
- May 2005 (32)
- April 2005 (27)
- March 2005 (32)
- February 2005 (20)
- January 2005 (38)
- December 2004 (49)
- November 2004 (38)
- October 2004 (24)
- September 2004 (23)
- August 2004 (38)
- July 2004 (39)
- June 2004 (38)
- May 2004 (17)
- April 2004 (32)
- March 2004 (15)
- February 2004 (6)
- January 2004 (19)
- December 2003 (19)
- November 2003 (15)
- October 2003 (15)
- September 2003 (12)
- August 2003 (20)
- July 2003 (26)
Search
March 2009
About this Entry
This page contains a single entry by Pank published on March 7, 2007 11:13 AM.
Google Translate was the previous entry in this blog.
BIND dump cache is the next entry in this blog.
Find recent content on the main index or look in the archives to find all content.
第一種作法裡,常見的還有 PHPMailer - http://phpmailer.sourceforge.net/ 。