代码点火器SMTP错误



我正试图通过Zoho SMTP服务器从CodeIgniter应用程序发送电子邮件。

这是代码:$this->load->library('email'(;

$config['protocol'] = 'smtp';
$config['smtp_host'] = 'smtp.zoho.com';
$config['smtp_user'] = '<username>';
$config['smtp_pass'] = '<password>';
$config['smtp_port'] = 465;
$config['smtp_crypto'] = 'ssl';
$config['mailtype'] = 'text';
$this->email->initialize($config);
$this->email->from('<mail>', '<name>');
$this->email->to('<mail>');
$this->email->subject("Test");
$this->email->message("Test message");
if(!$this->email->send()){
echo $this->email->print_debugger();
}

我得到这个输出:

220 mx.zohomail.com SMTP Server ready July 12, 2018 10:58:40 AM PDT
hello: 250-mx.zohomail.com Hello [::1] (83.240.61.40 (83.240.61.40))
250-STARTTLS
250 SIZE 53477376
starttls: 220 Ready to start TLS.
hello: 250-mx.zohomail.com Hello [::1] (83.240.61.40 (83.240.61.40))
250-AUTH LOGIN PLAIN
250 SIZE 53477376
from: 250 Sender  OK
to: 250 Recipient  OK
data: 354 Ok Send data ending with .

quit: 
The following SMTP error was encountered:
The following SMTP error was encountered:
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
Date: Thu, 12 Jul 2018 19:58:40 +0200
From: <from>
Return-Path: <from>
To: me@jradl.cz
Subject: =?UTF-8?Q?Test?=
Reply-To: <from>
User-Agent: CodeIgniter
X-Sender: <from>
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <id>
Mime-Version: 1.0

Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Test message

(已删除个人数据(

我在尝试使用Gmail SMTP服务器或其他帐户时收到相同的消息。有人能帮忙吗?

使用Windows 10、XAMPP、CodeIgniter 3.1.9。

好的,所以我只是通过添加以下行来解决这个问题:

$this->email->set_newline("rn");

相关内容

  • 没有找到相关文章

最新更新