Codeigniter 不通过 JangoSMTP 发送

发布于 2024-11-05 11:35:38 字数 2962 浏览 0 评论 0原文

我正在尝试使用 codeigniter 通过 JangoSMTP 发送电子邮件,无论出于何种原因,该脚本大约需要 60-70 秒,然后在该过程的最后部分(发送)上给我一个错误。

这是 CI 的调试..

*220 relay.jangosmtp.net ESMTP Welcome to the JangoSMTP trackable email relay system.; Thu, 05 May 2011 19:08:15 -0000

hello: 250-relay.jangosmtp.net Hello netdesk.aiwebsystems.com [173.236.184.252], pleased to meet you.

250-ENHANCEDSTATUSCODES

250-SIZE

250-EXPN

250-ETRN

250-ATRN

250-DSN

250-CHECKPOINT

250-8BITMIME

250-AUTH CRAM-MD5 PLAIN LOGIN DIGEST-MD5

250-STARTTLS

250 HELP

from: 250 2.1.0 ... Sender ok

to: 250 2.1.5 ... Recipient ok; will forward

to: 250 2.1.5 ... Recipient ok; will forward

data: 354 Enter mail, end with "." on a line by itself

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.

User-Agent: CodeIgniter

Date: Thu, 5 May 2011 14:08:16 -0500

From: "Ryan Thompson" 

Return-Path: 

To: [email protected]

Subject: =?utf-8?Q?Email_Test_SMTP?=

Reply-To: "[email protected]" 

X-Sender: [email protected]

X-Mailer: CodeIgniter

X-Priority: 3 (Normal)

Message-ID: <[email protected]>

Mime-Version: 1.0

Content-Type: text/plain; charset=utf-8

Content-Transfer-Encoding: 8bit

Testing the email class.*

这是我用来发送沙箱控制器的简单代码..

   function smtp(){
        $this->load->library('email');

        $config['protocol'] = 'smtp';
        $config['smtp_host'] = 'relay.jangosmtp.net';
        $config['smtp_user'] = 'MYUSERNAME';
        $config['smtp_pass'] = 'MYPASS';

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

        $this->email->from('[email protected]', 'Ryan Thompson');
        $this->email->to('[email protected]'); 

        $this->email->subject('Email Test SMTP');
        $this->email->message('Testing the email class.');  

        $this->email->send();

        echo $this->email->print_debugger();
    }

我用我的常规电子邮件主机和信用测试了完全相同的东西,它完美地弹出了。

我在 Jango 没有任何 IP 限制或发件人:限制。我仅以用户名/密码身份进行身份验证。

我的 CI 版本是 2.0.0

我已经束手无策了!我的 Email.php 类文件未经编辑。

I am trying to send an email using codeigniter through JangoSMTP and for whatever reason the script takes about 60-70 seconds then gives me an error on the last portion of the process, the send.

Here is CI's debug..

*220 relay.jangosmtp.net ESMTP Welcome to the JangoSMTP trackable email relay system.; Thu, 05 May 2011 19:08:15 -0000

hello: 250-relay.jangosmtp.net Hello netdesk.aiwebsystems.com [173.236.184.252], pleased to meet you.

250-ENHANCEDSTATUSCODES

250-SIZE

250-EXPN

250-ETRN

250-ATRN

250-DSN

250-CHECKPOINT

250-8BITMIME

250-AUTH CRAM-MD5 PLAIN LOGIN DIGEST-MD5

250-STARTTLS

250 HELP

from: 250 2.1.0 ... Sender ok

to: 250 2.1.5 ... Recipient ok; will forward

to: 250 2.1.5 ... Recipient ok; will forward

data: 354 Enter mail, end with "." on a line by itself

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.

User-Agent: CodeIgniter

Date: Thu, 5 May 2011 14:08:16 -0500

From: "Ryan Thompson" 

Return-Path: 

To: [email protected]

Subject: =?utf-8?Q?Email_Test_SMTP?=

Reply-To: "[email protected]" 

X-Sender: [email protected]

X-Mailer: CodeIgniter

X-Priority: 3 (Normal)

Message-ID: <[email protected]>

Mime-Version: 1.0

Content-Type: text/plain; charset=utf-8

Content-Transfer-Encoding: 8bit

Testing the email class.*

Here is the simple code I am using to send in a sandbox controller..

   function smtp(){
        $this->load->library('email');

        $config['protocol'] = 'smtp';
        $config['smtp_host'] = 'relay.jangosmtp.net';
        $config['smtp_user'] = 'MYUSERNAME';
        $config['smtp_pass'] = 'MYPASS';

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

        $this->email->from('[email protected]', 'Ryan Thompson');
        $this->email->to('[email protected]'); 

        $this->email->subject('Email Test SMTP');
        $this->email->message('Testing the email class.');  

        $this->email->send();

        echo $this->email->print_debugger();
    }

I tested this exact same thing with my regular email host and creds and it popped one off perfectly.

I don't have any IP restrictions or From: restrictions at Jango. I am authing only as username/pass.

My CI Version is 2.0.0

I am at the end of my wits!! My Email.php class file is un-edited.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

辞旧 2024-11-12 11:35:38

请参阅此处

该问题可能是由于以下事实造成的: CodeIgniter 默认使用 LF 作为行终止符,而不是 RFC 要求的 CRLF。添加此代码:

$this->config['crlf'] = '\r\n';
$this->config['newline'] = '\r\n';

See here

The problem is likely due to the fact that CodeIgniter defaults to using LF as the line terminator, rather than CRLF required by RFC. Add this code:

$this->config['crlf'] = '\r\n';
$this->config['newline'] = '\r\n';
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文