1

私はcodeigniterで電子メールを送信しようとし、print_debuggerを実行します..

これは私のコントローラーです

$this->load->library('email');   
     $this->email->from('blablabla@gmail.com', 'Blabla');
     $this->email->to('xxx@gmail.com');    
     $this->email->subject('This is an email test');      
     $this->email->message('It is working. Great!');
    $this->email->send();
     echo $this->email->print_debugger();

そして結果..

220 mx.google.com ESMTP s7sm28822467paz.7

hello: 250-mx.google.com at your service, [125.165.91.123]
250-SIZE 35882577
250-8BITMIME
250-AUTH LOGIN PLAIN XOAUTH XOAUTH2
250 ENHANCEDSTATUSCODES

from: 250 2.1.0 OK s7sm28822467paz.7

to: 250 2.1.5 OK s7sm28822467paz.7

data: 354  Go ahead s7sm28822467paz.7

250 2.0.0 OK 1357110923 s7sm28822467paz.7

quit: 221 2.0.0 closing connection s7sm28822467paz.7

Your message has been successfully sent using the following protocol: smtp

User-Agent: CodeIgniter
Date: Wed, 2 Jan 2013 08:15:21 +0100
From: "Blabla" 
Return-Path: 
To: xxx@gmail.com
Subject: =?utf-8?Q?This_is_an_email_test?=
Reply-To: "blablabla@gmail.com" 
X-Sender: pendaftaransiswabaruminor@gmail.com
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <50e3de8936e41@gmail.com>
Mime-Version: 1.0


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

It is working. Great!

「あなたのメッセージは、次のプロトコルを使用して正常に送信されました: smtp」という成功が示されますが、なぜ私のメールが送信されないのですか?

4

1 に答える 1

1

これは、codeigniter で gmail アドレスを使用してメールを送信するために使用する構成です。

$ci = get_instance();
$ci->load->library('email');
$config['protocol'] = "smtp";
$config['smtp_host'] = "ssl://smtp.gmail.com";
$config['smtp_port'] = "465";
$config['smtp_user'] = "blablabla@gmail.com"; 
$config['smtp_pass'] = "yourpassword";
$config['charset'] = "utf-8";
$config['mailtype'] = "html";
$config['newline'] = "\r\n";

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

$ci->email->from('blablabla@gmail.com', 'Blabla');
$list = array('xxx@gmail.com');
$ci->email->to($list);
$ci->email->subject('This is an email test');
$ci->email->message('It is working. Great!');
$ci->email->send();
于 2013-04-13T18:20:37.980 に答える