2013-09-13 3 views
0

Я пытаюсь отправить ссылку для сброса пароля для пользователя с помощью SMTP в CodeIgniter со следующими конфигурациямиошибка SMTP в коде воспламенитель

$config = Array('protocol' => 'smtp', 
       'smtp_host' => 'my-host', 
       'smtp_user' => 'user', 
       'smtp_port' =>25, 
       'smtp_pass' => '********', 
       '_smtp_auth'=>TRUE, 
       'mailtype' => 'text', 
       'charset'=> 'iso-8859-1' 
       ); 


      $this->load->library('email',$config); 
      $this->email->to($address); 
      $this->email->from($from); 
      $this->email->subject($subject); 
      $this->email->message($message); 
      $res=$this->email->send(); 
      echo $this->email->print_debugger(); 

но следующие ошибки являются распечатать debugger.I я не получаю то, что актуальная проблема является.

220-vps.hostjinniwebhosting.com ESMTP Exim 4.80.1 #2 Fri, 13 Sep 2013 09:48:37 +0530 
220-We do not authorize the use of this system to transport unsolicited, 
220 and/or bulk e-mail. 
<br /><pre>hello: 250-vps.hostjinniwebhosting.com Hello tv100.info [66.225.213.151] 
250-SIZE 52428800 
250-8BITMIME 
250-PIPELINING 
250-AUTH PLAIN LOGIN 
250-STARTTLS 
250 HELP 
</pre><pre>from: 250 OK 
</pre><pre>to: 501 <>: missing or malformed local part 
</pre>The following SMTP error was encountered: 501 <>: missing or malformed local part 
<br /><pre>data: 503-All RCPT commands were rejected with this error: 
503-501 <>: missing or malformed local part 
503 Valid RCPT command must precede DATA 
</pre>The following SMTP error was encountered: 503-All RCPT commands were rejected with this error: 
503-501 <>: missing or malformed local part 
503 Valid RCPT command must precede DATA 
<br />500 unrecognized command 
<br />The following SMTP error was encountered: 500 unrecognized command 
<br />Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.<br /><pre>User-Agent: CodeIgniter 
Date: Thu, 12 Sep 2013 23:18:37 -0500 
From: &lt;[email protected]&gt; 
Return-Path: &lt;[email protected]&gt; 
Subject: =?iso-8859-1?Q?Reset_your_password?= 
Reply-To: &quot;[email protected]&quot; &lt;[email protected]&gt; 
X-Sender: [email protected] 
X-Mailer: CodeIgniter 
X-Priority: 3 (Normal) 
Message-ID: &lt;[email protected]&gt; 
Mime-Version: 1.0 


Content-Type: text/plain; charset=iso-8859-1 
Content-Transfer-Encoding: 8bit 

пожалуйста кто-нибудь сказать мне, что случилось с этим ...

+0

http://stackoverflow.com/questions/1555145/sending-email-with-gmail-smtp-with-codeigniter-email-library это может помочь –

ответ

0

Ключом здесь:

to: 501 <>: missing or malformed local part 
</pre>The following SMTP error was encountered: 501 <>: missing or malformed local part 
<br /><pre>data: 503-All RCPT commands were rejected with this error: 
503-501 <>: missing or malformed local part 
503 Valid RCPT command must precede DATA 
</pre>The following SMTP error was encountered: 503-All RCPT commands were rejected with this error: 
503-501 <>: missing or malformed local part 
503 Valid RCPT command must precede DATA 

Похоже, ваш «To» адрес не указан действительный адрес электронной почты адрес. Убедитесь, что значение $address на самом деле имеет адрес электронной почты, используемый в этой строке:

$this->email->to($address); 

Я бы также проверить все другие переменные ($from, $subject и т.д.) имеют действительные значения.

+0

спасибо, сэр .......... – yogesh

Смежные вопросы