2011-05-05 4 views
0

JangoSMTP를 통해 codeigniter를 사용하여 전자 메일을 보내려고하고 있으며 스크립트가 60-70 초 정도 걸리는 이유가 무엇이든지간에 마지막 부분 인 보내기에 오류가 발생합니다. 여기 Codeigniter가 JangoSMTP를 통해 전송하지 않습니다.

는 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(); 
    } 

내가 내 정기적 인 이메일로이 똑같은 테스트 호스트와 creds 그리고 완벽하게 하나가 터 졌어.

IP 제한이나 보낸 사람 : Jango의 제한 사항이 없습니다. 나는 사용자 이름/패스로만 자만하고 있습니다.

내 CI 버전은 2.0.0

내 지혜의 끝에서 오전입니다! 내 Email.php 클래스 파일이 수정되지 않았습니다.

답변

1

인해 오히려 CRLF보다 줄 끝으로 LF를 사용하는 CodeIgniter는 기본적으로는, RFC에 필요한 사실을 here

문제는 가능성을 참조하십시오. 이 코드를 추가

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

안녕 @DeanGoodman을 내 설정에이 두 라인을 추가,하지만 난 내 Gmail로 보낼 때 난 여전히 오류를 받고 있어요'오류 : 이메일 주소가 verified.' 없습니다. 메시지를 보낸 동일한 도메인으로 보낼 때만 작동합니다. 이것에 대한 어떤 생각? 감사 –

관련 문제