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

首頁(yè) > 網(wǎng)站 > IIS > 正文

iis中配置php mail函數(shù)的sendmail方法

2024-08-29 02:57:06
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友

很多玩discuz的盆友在使用在線發(fā)郵件的功能,但是測(cè)試了"通過(guò) PHP 函數(shù)的 sendmail 發(fā)送(推薦此方式)"怎么都沒(méi)用,因?yàn)楸救爽F(xiàn)在用的是iis+php環(huán)境,所以就出這么一個(gè)教程,教大家在自己服務(wù)器上配置sendmail

首先你需要先到從http://glob.com.au/sendmail/下載sendmail.zip文件,點(diǎn)此可以直接下載噢,然后把它解壓到如D:/php/sendmail/目錄下。

然后打開(kāi)php.ini文件,找到下面這段代碼 

[mail function] ;
For Win32 only.
SMTP = localhost
smtp_port = 25
; For Win32 only.
;sendmail_from = me@example.com
; For Unix only. You may supply arguments as well (default: ”sendmail -t -i”).
; sendmail_path = ”"
; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =

默認(rèn)情況下是以本機(jī)做為郵件服務(wù)器,這里我們需要借用sendmail來(lái)發(fā)送郵件,用sendmail來(lái)配置如用qq、163的郵箱來(lái)發(fā)送(一般都是以這種方式)所以我們需要把所有的選項(xiàng)都注銷,即把SMTP = localhost和smtp_port = 25前面加上“;”然后把sendmai_path=""前面的“;”刪掉,改為sendmai_path="d:/php/sendmail/sendmail.exe -t",改完后的即是 

[mail function]
; For Win32 only.
;SMTP = localhost
 ;smtp_port = 25
; For Win32 only.
;sendmail_from = me@example.com
; For Unix only. You may supply arguments as well (default: ”sendmail -t -i”).
sendmail_path = ”d:/php/sendmail/sendmail.exe -t"
; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =

注意以上只需要開(kāi)啟sendmail_path即可,然后保存

接著修改sendmail目錄下的sendmail.ini文件,主要填的內(nèi)容有以下幾項(xiàng)

smtp_server=smtp服務(wù)器地址(如 smtp.ym.163.com)
auth_username=郵箱登錄名(如 info@xxxx.com)
auth_password=郵箱密碼(如 xxxxxx)
force_sender=發(fā)件人地址全寫(xiě)(如 info@xxxx.com)

另外還有一項(xiàng)

; auto = use SSL for port 465, otherwise try to use TLS

把前面的“;”刪除,即開(kāi)啟SSL安全登錄選項(xiàng)即可

以上四項(xiàng)正確填寫(xiě)修改完成后保存,然后重啟IIS即可正常使用。

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 昭苏县| 东台市| 洛川县| 寻乌县| 萨迦县| 栾川县| 凤阳县| 星子县| 云霄县| 普兰店市| 娱乐| 雷州市| 铜鼓县| 肥西县| 罗江县| 武汉市| 桃园县| 安化县| 麻江县| 如皋市| 辉南县| 曲周县| 永泰县| 贡山| 隆尧县| 上蔡县| 冷水江市| 洪雅县| 盘锦市| 延边| 曲松县| 隆子县| 博野县| 沂水县| 清水河县| 连云港市| 新巴尔虎左旗| 塔城市| 加查县| 宁晋县| 响水县|