今天一個客戶聯(lián)系我說他的網(wǎng)站發(fā)不了郵件,問是不是我們的馬來西亞vps有開啟25端口,我心想,不可能啊,我們的馬來西亞vps默認是開啟25端口的,于是我要了vps資料,我測試一下25端口是否開啟
測試的25端口是開啟的,所以排除了25端口的問題,那么就應該是馬來西亞vps設置的問題,于是我就好好檢查了一下,測試一下出現(xiàn)錯誤:
Email Error: Could not instantiate mail function. Please check Admin->Configuration->Email Options->Email Transport.
P于是我就百度了一下,還真有解決方案,這樣就很好解決了,接下來我整理一下PHP函數(shù)mail()報Could not instantiate mail function.錯誤解決方案
在php發(fā)函數(shù)時,函數(shù)mail()提示Could not instantiate mail function.錯誤,用phpmailer組件發(fā)送也提示這個錯誤,現(xiàn)在我把解決問題整理出來.
網(wǎng)上有很多朋友用phpmailer組件發(fā)送郵件提示:Could not instantiate mail function.錯誤,解決方案少之用少,原因是服務器沒有安裝sendmail組件,使用yum進行安裝:
yum install sendmail