php mailer 发送邮件报错:Mailer Error: Could not instantiate mail function。是怎么回事?

coke_lucky 2015-09-29 04:14:40
php mailer 发送邮件报错:Mailer Error: Could not instantiate mail function。是怎么回事? stocke 已经开启;发送邮件的stmp 已经开启,发送页面代码如下: ; 打印页面的$mail 显示的内容如下:已开启Could not instantiate mail function.

object(PHPMailer)[118]
public 'Priority' => int 3
public 'CharSet' => string 'UTF-8' (length=5)
public 'ContentType' => string 'multipart/alternative' (length=21)
public 'Encoding' => string '8bit' (length=4)
public 'ErrorInfo' => string 'Could not instantiate mail function.' (length=36)
public 'From' => string 'bjhhytchild@163.com' (length=19)
public 'FromName' => string '' (length=0)
public 'Sender' => string 'bjhhytchild@163.com' (length=19)
public 'Subject' => string '222222' (length=6)
public 'Body' => string '222222' (length=6)
public 'AltBody' => string 'To view the message, please use an HTML compatible email viewer!' (length=64)
public 'WordWrap' => int 0
public 'Mailer' => string 'SMTP' (length=4)
public 'Sendmail' => string '/usr/sbin/sendmail' (length=18)
public 'PluginDir' => string '' (length=0)
public 'ConfirmReadingTo' => string '' (length=0)
public 'Hostname' => string '' (length=0)
public 'MessageID' => string '' (length=0)
public 'Host' => string 'smtp.163.com' (length=12)
public 'Port' => int 25
public 'Helo' => string '' (length=0)
public 'SMTPSecure' => string 'ssl' (length=3)
public 'SMTPAuth' => boolean true
public 'Username' => string 'bjhhytchild' (length=11)
public 'Password' => string 'hhyt123' (length=7)
public 'Timeout' => int 10
public 'SMTPDebug' => int 0
public 'SMTPKeepAlive' => boolean false
public 'SingleTo' => boolean false
public 'SingleToArray' =>
array (size=0)
empty
public 'LE' => string '
' (length=1)
public 'DKIM_selector' => string 'phpmailer' (length=9)
public 'DKIM_identity' => string '' (length=0)
public 'DKIM_domain' => string '' (length=0)
public 'DKIM_private' => string '' (length=0)
public 'action_function' => string '' (length=0)
public 'Version' => string '5.1' (length=3)
private 'smtp' => null
private 'to' =>
array (size=1)
0 =>
array (size=2)
0 => string '327917556@qq.com' (length=16)
1 => string '' (length=0)
private 'cc' =>
array (size=0)
empty
private 'bcc' =>
array (size=0)
empty
private 'ReplyTo' =>
array (size=1)
'bjhhytchild@163.com' =>
array (size=2)
0 => string 'bjhhytchild@163.com' (length=19)
1 => string '' (length=0)
private 'all_recipients' =>
array (size=1)
'327917556@qq.com' => boolean true
private 'attachment' =>
array (size=0)
empty
private 'CustomHeader' =>
array (size=0)
empty
private 'message_type' => string 'alt' (length=3)
private 'boundary' =>
array (size=2)
1 => string 'b1_9cb9d1c14d0c9c230b0856d1b8cf65bb' (length=35)
2 => string 'b2_9cb9d1c14d0c9c230b0856d1b8cf65bb' (length=35)
protected 'language' =>
array (size=17)
'provide_address' => string 'You must provide at least one recipient email address.' (length=54)
'mailer_not_supported' => string ' mailer is not supported.' (length=25)
'execute' => string 'Could not execute: ' (length=19)
'instantiate' => string 'Could not instantiate mail function.' (length=36)
'authenticate' => string 'SMTP Error: Could not authenticate.' (length=35)
'from_failed' => string 'The following From address failed: ' (length=35)
'recipients_failed' => string 'SMTP Error: The following recipients failed: ' (length=45)
'data_not_accepted' => string 'SMTP Error: Data not accepted.' (length=30)
'connect_host' => string 'SMTP Error: Could not connect to SMTP host.' (length=43)
'file_access' => string 'Could not access file: ' (length=23)
'file_open' => string 'File Error: Could not open file: ' (length=33)
'encoding' => string 'Unknown encoding: ' (length=18)
'signing' => string 'Signing Error: ' (length=15)
'smtp_error' => string 'SMTP server error: ' (length=19)
'empty_message' => string 'Message body empty' (length=18)
'invalid_address' => string 'Invalid address' (length=15)
'variable_set' => string 'Cannot set or reset variable: ' (length=30)
private 'error_count' => int 1
private 'sign_cert_file' => string '' (length=0)
private 'sign_key_file' => string '' (length=0)
private 'sign_key_pass' => string '' (length=0)
private 'exceptions' => boolean false

int 11

Mailer Error: Could not instantiate mail function.{"status":true,"url":"\/ChildrenShop\/child\/user\/login","falg":false}
...全文
821 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
傲雪星枫 2015-10-01
  • 打赏
  • 举报
回复
你调用的邮件服务器是smtp.163.com
因为你使用的是ssl方式,所以不应该使用25端口

smtp.163.com端口号如下,改为465就可以了。
163邮箱的收取邮件支持POP/IMAP两种协议,发送邮件采用SMTP协议,采用SSL协议和非SSL协议时端口号有所区别,参照下表的一些常见配置组合:

类型 服务器名称 服务器地址 SSL协议端口号 非SSL协议端口号
收件服务器 POP pop.163.com 995 110
收件服务器 IMAP imap.163.com 993 143
发件服务器 SMTP smtp.163.com 465/994 25


Mrdolor 2015-09-30
  • 打赏
  • 举报
回复
用户名应该写成邮箱

21,886

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧