2011-12-07 49 views
5

我试图通过SMTP从我的PHP脚本发送邮件,通过CodeIgniter运行。从PHP发送邮件 - 是我的错误,还是邮件服务器?

请参阅下面的调试输出。这是表明一个问题,我用PHP结束(Unable to send email using PHP SMTP),或在其末端(hello: 250-parrot.email-provider.co.uk - 这将意味着我已经连接到他们的服务器,因为我进入了实际的SMTP服务器是mail2.email-provider.co.uk,如此看来连接和重定向到这parrot事情)。

我的SMTP细节我已确认是正确的,但它仍然表示,它无法验证密码 - 尽管这相同的密码在我的家乡邮件客户端的工作。

我已经改变了我的网站名称和提供商的名字(我不想名称和耻辱,如果是我的错!):

220 parrot.email-provider.co.uk ESMTP Postfix 
hello: 250-parrot.email-provider.co.uk 
250-PIPELINING 
250-SIZE 512000000 
250-ETRN 
250-STARTTLS 
250-AUTH PLAIN LOGIN CRAM-MD5 DIGEST-MD5 
250-ENHANCEDSTATUSCODES 
250-8BITMIME 
250 DSN 
Failed to authenticate password. Error: 535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6 
from: 250 2.1.0 Ok 
to: 554 5.7.1 : Relay access denied 
The following SMTP error was encountered: 554 5.7.1 : Relay access denied 
to: 554 5.7.1 : Relay access denied 
The following SMTP error was encountered: 554 5.7.1 : Relay access denied 
to: 554 5.7.1 : Relay access denied 
The following SMTP error was encountered: 554 5.7.1 : Relay access denied 
data: 554 5.5.1 Error: no valid recipients 
The following SMTP error was encountered: 554 5.5.1 Error: no valid recipients 
221 2.7.0 Error: I can break rules, too. Goodbye. 
The following SMTP error was encountered: 221 2.7.0 Error: I can break rules, too. Goodbye. 
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method. 
User-Agent: CodeIgniter 
Date: Wed, 7 Dec 2011 13:30:16 +0000 
From: "Mysite.com" 
Return-Path: 
To: [email protected] 
Cc: [email protected] 
Subject: =?utf-8?Q?The_Subject?= 
Reply-To: "[email protected]" 
X-Sender: [email protected] 
X-Mailer: CodeIgniter 
X-Priority: 3 (Normal) 
Message-ID: <[email protected]> 
Mime-Version: 1.0 
+0

你的实际PHP代码是什么样的?尤其是您设置身份验证的部分。 – Oldskool

回答

0

如果您使用的是笨邮件对象,尝试: $这个 - >的电子邮件 - > print_debugger()

蛮力方法,从应用程序进入上一层,放在log_message /跟踪,调试实际的codeigniter代码,看看发生了什么。

1

可以是:

  1. 错误的密码。

  2. 登录方法不允许/服务器识别。

0

我有同样的问题。我已经设置好一切,并获得相同的信息。

问题是因为我已经设置to地址$this->email->to之前我已应用与$this->email->initialize($config) smtp设置。在所有其他设置之前移动此行之后,所有事情都按照预期运行。

相关问题