简体   繁体   English

无法使用 PHP Sendmail 发送电子邮件。 您的服务器可能未配置为使用此方法发送邮件

[英]Unable to send email using PHP Sendmail. Your server might not be configured to send mail using this method

Unable to send email using PHP Sendmail.无法使用 PHP Sendmail 发送电子邮件。 Your server might not be configured to send mail using this method.您的服务器可能未配置为使用此方法发送邮件。

// config content // 配置内容

$protocol = 'sendmail';
$mailpath = '/usr/sbin/sendmail';
$charset = 'iso-8859-1';
$wordwrap = TRUE;
$mailtype= "html";
$smtp_host= "mail.domain.com";//pengaturan smtp
$smtp_port= "465";
$smtp_timeout= "25";
$user = "";
$pass = "";

// config array // 配置数组

$config                   = array();
$config['protocol']       = $protocol;
$config['mailpath']       = $mailpath;
$config['charset']        = $charset;
$config['wordwrap']       = $wordwrap;
$config['mailtype']       = $mailtype;
$config['smtp_host']      = $smtp_host;
$config['smtp_port']      = $smtp_port;
$config['smtp_timeout']   = $smtp_timeout;
$config['smtp_user']      = $user;
$config['smtp_pass']      = $pass;
$config['crlf']           = "\r\n";
$config['newline']        = "\r\n";
$config['send_multipart'] = FALSE;

// send // 发送

$this->email->initialize($config);

$this->email->from($config['smtp_user'], 'Info');
$this->email->to($query['email']);
$this->email->subject("Reset password berhasil");
$this->email->message("adadad");
if ($this->email->send()) {
    echo "berhasil";
} 

Well sendmail allows you to send email using the sendmail program installed on your local server.好吧,sendmail 允许您使用安装在本地服务器上的 sendmail 程序发送电子邮件。 Do you have sendmail installed on your server.您的服务器上是否安装了 sendmail。

Also you have specified SMTP connection settings in your config file.您还在配置文件中指定了 SMTP 连接设置。 Maybe you dont need sendmail.也许你不需要sendmail。 Try to change the protocol field from sendmail to smtp.尝试将协议字段从 sendmail 更改为 smtp。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法使用 PHP mail() 发送电子邮件。 您的服务器可能未配置为使用此方法发送邮件 - Unable to send email using PHP mail(). Your server might not be configured to send mail using this method 遇到错误无法使用 PHP mail() 发送 email。 您的服务器可能未配置为使用此方法发送邮件 - An Error Was Encountered Unable to send email using PHP mail(). Your server might not be configured to send mail using this method Codeigniter 3 无法使用 PHP ZC2239A92BDE29F0A00F9173193CC2FE 发送 email。 您的服务器可能未配置为使用此方法发送邮件 - Codeigniter 3 Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method Codeigniter:您的服务器可能未配置为使用此方法发送邮件。 无法使用 PHP SMTP 发送电子邮件 - Codeigniter: Your server might not be configured to send mail using this method. Unable to send email using PHP SMTP 无法使用 PHP SMTP 发送 email。您的服务器可能未配置为使用此方法发送邮件 - Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method 无法使用codeigniter发送电子邮件-错误:您的服务器可能未配置为使用此方法发送邮件 - Unable to send email using codeigniter-Error:Your server might not be configured to send mail using this method 无法使用 PHP SMTP 发送电子邮件。 您的服务器可能未配置为使用此方法发送邮件 - Unable to send email using PHP SMTP. Your server might not be configured to send mail using this methods CodeIgniter中的AWS SMTP邮件错误(无法使用PHP SMTP发送电子邮件。您的服务器可能未配置为使用此方法发送邮件。) - AWS SMTP mail error in CodeIgniter (Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.) 无法发送AUTH LOGIN命令。 错误:无法使用PHP SMTP发送电子邮件。 您的服务器可能未配置为使用此方法发送邮件 - Failed to send AUTH LOGIN command. Error: Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method 您的服务器可能未配置为使用此方法发送邮件 - Your server might not be configured to send mail using this method
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM