[英]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.