-5

codeigniterを介してメールを送信できません。を使用してエラーをエコーし​​ようとするとecho $this->email->print_debugger();、次のエラーが発生しました。

hello: 250-smtpout17-02.prod.mesa1.secureserver.net 
250-PIPELINING
250 8BITMIME

Failed to send AUTH LOGIN command. Error: 502 unimplemented (#5.5.1)

from: 250 ok

to: 553 sorry, relaying denied from your location [---] (#5.7.1)

The following SMTP error was encountered: 553 sorry, relaying denied from your location [--] (#5.7.1)

data: 503 RCPT first (#5.5.1)

The following SMTP error was encountered: 503 RCPT first (#5.5.1)
502 unimplemented (#5.5.1)
The following SMTP error was encountered: 502 unimplemented (#5.5.1)
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.

問題を特定できません。理由がわかっている場合は、サポートしてください。

4

4 に答える 4

3

こんにちは、私のプロジェクトに使用したこのコード。Gmailから送信していますので、サーバーごとに変更してください。

function sendMail()
    {
        $config = Array(
      'protocol' => 'smtp',
      'smtp_host' => 'ssl://smtp.googlemail.com',
      'smtp_port' => 465,
      'smtp_user' => 'xxx@gmail.com', // change it to yours
      'smtp_pass' => 'xxx', // change it to yours
      'mailtype' => 'html',
      'charset' => 'iso-8859-1',
      'wordwrap' => TRUE
    );

            $message = '';
            $this->load->library('email', $config);
          $this->email->set_newline("\r\n");
          $this->email->from('xxx@gmail.com'); // change it to yours
          $this->email->to('xxx@gmail.com');// change it to yours
          $this->email->subject('Resume from JobsBuddy for your Job posting');
          $this->email->message($message);
          if($this->email->send())
         {
          echo 'Email sent.';
         }
         else
        {
         show_error($this->email->print_debugger());
        }

    }
于 2012-11-12T16:39:19.727 に答える
2

The issue was with SMTP-host. I was providing a wrong smtp host and that's why it was giving me this error.

于 2012-11-14T05:25:58.240 に答える
0

SMTP サーバーがあなたの IP からのメール送信を許可していないようです。正しい SMTP サーバーを使用していることを確認してください。

于 2012-11-12T14:18:04.117 に答える
0

提供されたいくつかの古い GoDaddy チュートリアルが原因で、この同じ問題が発生し、間違ったホスト アドレスが確認されました。この問題が発生した時点で、GoDaddy のメール サービス (secureserver.net) も使用していたようです。この問題に遭遇した他の人のために、更新された情報...

host = 'smtpout.secureserver.net'

..(現在)詳細はこちら:リンク

于 2014-02-07T20:16:56.093 に答える