国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Windows > 正文

解決windows系統下php.ini郵件配置正確不發送郵件的問題

2019-11-28 03:44:48
字體:
來源:轉載
供稿:網友
Warning: mail() [function.mail]: SMTP server response: 530 5.7.0 Must issue a STARTTLS command first
php mail()函數在windows不能用,需要安裝sendmail

1.從http://glob.com.au/sendmail/下載sendmail.zip
2.解壓到C:下,例如C:/php/sendmail,最好短路徑,長路徑名有可能產生問題。
3.修改php.ini如下
sendmail_path = "C:/wamp/sendmail/sendmail.exe -t"
4.根據你自己的配置環境修改sendmail.ini。
第一次最好啟用debug.log_file,error_logfile,以查看sendmail是否生效。
5.重啟apache

用sendmail結合其它的smtp服務器,如smtp.163.com來實現發郵件?,F在大部分郵箱都要求smtp驗證,所以要在sendmail.ini中加入用戶名和密碼。
php.ini配置 (以用163郵箱為例)

復制代碼
代碼如下:

[mail function]
; For Win32 only.
SMTP = smtp.163.com
smtp_port = 25
; For Win32 ……

用sendmail結合其它的smtp服務器,如smtp.163.com來實現發郵件?,F在大部分郵箱都要求smtp驗證,所以要在sendmail.ini中加入用戶名和密碼。
php.ini配置 (以用163郵箱為例)

復制代碼
代碼如下:

[mail function]
; For Win32 only.
SMTP = smtp.163.com
smtp_port = 25
; For Win32 only.
sendmail_from = 4u4v@163.com
; For Unix only. You may supply arguments as well (default: “sendmail -t -i”).
sendmail_path = “D:/xampp/sendmail/sendmail.exe -t”

就配置三項,smtp、smtp_port和sendmail_path
sendmail.ini配置

復制代碼
代碼如下:

[sendmail]
; you must change mail.mydomain.com to your smtp server
smtp_server=smtp.163.com
smtp_port=25
auth_username=yourusername
auth_password=yourpassword
force_sender=yourusername@163.com

sendmail網上有下的,如果你是用xampp,那里面直接就帶了。
同時在虛擬主機的conf里加上這樣一句

復制代碼
代碼如下:

php_admin_value sendmail_path ‘D:/xampp/sendmail/sendmail.exe -t 4u4v@163.com’

此郵件地址為用戶的郵件地址,隨便添。
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 通许县| 河东区| 团风县| 深圳市| 淄博市| 和平区| 万安县| 新龙县| 井研县| 石楼县| 河东区| 毕节市| 临夏市| 梁平县| 洪湖市| 茶陵县| 防城港市| 治县。| 清远市| 朔州市| 东丽区| 木里| 陕西省| 红原县| 西林县| 梨树县| 汉川市| 威海市| 延长县| 双江| 绵阳市| 富川| 西丰县| 额尔古纳市| 紫金县| 铜鼓县| 青铜峡市| 玉门市| 大洼县| 景洪市| 育儿|