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

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

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

2024-08-29 03:14:28
字體:
供稿:網(wǎng)友

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

首先你需要先到從http://glob.com.au/sendmail/下載sendmail.zip文件,然后把它解壓到如D:/php/sendmail/目錄下。

然后打開php.ini文件,找到下面這段代碼

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

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

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

注意以上只需要開啟sendmail_path即可,然后保存

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

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

另外還有一項(xiàng)

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

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

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

發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 泾阳县| 乐平市| 安达市| 巢湖市| 深泽县| 光山县| 荥阳市| 观塘区| 古蔺县| 桃江县| 隆子县| 丹寨县| 古蔺县| 孟村| 临沂市| 安国市| 茌平县| 彰化市| 都兰县| 屏东县| 金塔县| 吉林市| 南阳市| 孝感市| 巢湖市| 建湖县| 红安县| 和龙市| 淄博市| 永安市| 九江市| 石泉县| 武陟县| 宜丰县| 肇州县| 长顺县| 阿巴嘎旗| 习水县| 略阳县| 高邑县| 景宁|