【phpmailer】类Could not instantiate mail function / IXWebHosting空间
not 空间 Function could mail phpmailer instantiate
2023-06-13 09:14:30 时间
今天,在IXWebHost 上用 phpmailer类 发送邮件,源代码是从我的justhost空间直接copy过来的,但在IXWebHost空间上,出现Could not instantiate mail function错误,后来发现时发现邮件头部的问题,还有发现的内容也有点不对…
之后修改 :
class.phpmailer.php
1. public function Send() 函数中,大约572-579行
// Choose the mailer and send through it
switch($this->Mailer) {
case 'sendmail':
return $this->SendmailSend($header, $body);
case 'smtp':
return $this->SmtpSend($header, $body);
default:
return $this->MailSend($header, $this->Body); //这行 by 111 ,处理发送邮件内错不正确的问题
}
2. protected function MailSend 函数 中,大约 676-684行
else {
//by zhiqi 111 edit : ixwebhost 空间走的是这步
$headers = substr($header,0,strpos($header,'Message-ID')); //重新 处理头文件
$rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)),$body,$headers); //修改头文件变量
//implement call back function if it exists
$isSent = ($rt == 1) ? 1 : 0;
$this->doCallback($isSent,$to,$this->cc,$this->bcc,$this->Subject,$body);
}
转载于:https://www.cnblogs.com/zhiqixue/archive/2012/11/13/2768121.html
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/180619.html原文链接:https://javaforall.cn
相关文章
- ALERT! UUID=xxxxxxxxx does not exist. Dropping to a shell!
- ORA-23428: job associated instance number string is not valid ORACLE 报错 故障修复 远程处理
- ORA-24337: statement handle not prepared ORACLE 报错 故障修复 远程处理
- ORA-26010: Column string in table string is NOT NULL and is not being loaded ORACLE 报错 故障修复 远程处理
- ORA-29864: analyzing domain indexes marked LOADING/FAILED not supported ORACLE 报错 故障修复 远程处理
- ORA-30380: REWRITE_TABLE does not exist ORACLE 报错 故障修复 远程处理
- ORA-32153: Environment not specified ORACLE 报错 故障修复 远程处理
- ORA-38423: Attribute set created from an ADT may not be extended. ORACLE 报错 故障修复 远程处理
- ORA-39940: Child reference partitioned table string.string in tablespace string or parent table string.string in tablespace string is included but not both. ORACLE 报错 故障修复 远程处理
- ORA-41009: Session with session number string, serial number string does not exist ORACLE 报错 故障修复 远程处理
- ORA-48468: “string” is not a valid keyword ORACLE 报错 故障修复 远程处理
- ORA-64014: directory not empty ORACLE 报错 故障修复 远程处理
- MySQL Error number: MY-011333; Symbol: ER_XPLUGIN_UNIX_SOCKET_NOT_CONFIGURED; SQLSTATE: HY000 报错 故障修复 远程处理
- ORA-14651: reference partitioning constraint is not supported ORACLE 报错 故障修复 远程处理
- MySQL中NOT操作的使用方法与实例分析(mysql中not)