Note that there are some explanatory texts on larger screens.

plurals
  1. POCan not send email from codeigniter framework
    primarykey
    data
    text
    <p>I have seen the same question on this and many other websites but the solutions they gave do not work for me. So i am asking again. </p> <p>To send mail i wrote the following code</p> <pre><code>&lt;?php class Email extends CI_Controller{ function __construct() { parent::__construct(); } function index() { $config = Array( 'protocol' =&gt; 'smtp', 'smtp_host' =&gt; 'ssl://smtp.googlemail.com', 'smtp_port' =&gt; 465, 'username' =&gt; 'mymail@gmail.com', 'password' =&gt; 'password' ); $this-&gt;load-&gt;library('email', $config); $this-&gt;email-&gt;set_newline("\r\n"); $this-&gt;email-&gt;from('mymail@gmail.com', 'mymail bcc'); $this-&gt;email-&gt;to('mymail@gmail.com'); $this-&gt;email-&gt;subject('This is a test email'); $this-&gt;email-&gt;message('Oops This is Great.'); if($this-&gt;email-&gt;send()) { echo 'Your email was sent'; } else { show_error($this-&gt;email-&gt;print_debugger()); } } } </code></pre> <p>I installed openssl and also uncommented the line extension=php_openssl.dll from php.ini. But i get the following erros</p> <pre><code> An Error Was Encountered 220 mx.google.com ESMTP qp6sm2730344pbc.55 hello: 250-mx.google.com at your service, [119.30.39.78] 250-SIZE 35882577 250-8BITMIME 250-AUTH LOGIN PLAIN XOAUTH 250 ENHANCEDSTATUSCODES from: 530-5.5.1 Authentication Required. Learn more at 530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 qp6sm2730344pbc.55 The following SMTP error was encountered: 530-5.5.1 Authentication Required. Learn more at 530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 qp6sm2730344pbc.55 to: 530-5.5.1 Authentication Required. Learn more at 530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 qp6sm2730344pbc.55 The following SMTP error was encountered: 530-5.5.1 Authentication Required. Learn more at 530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 qp6sm2730344pbc.55 data: 530-5.5.1 Authentication Required. Learn more at 530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 qp6sm2730344pbc.55 The following SMTP error was encountered: 530-5.5.1 Authentication Required. Learn more at 530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 qp6sm2730344pbc.55 502 5.5.1 Unrecognized command. qp6sm2730344pbc.55 The following SMTP error was encountered: 502 5.5.1 Unrecognized command. qp6sm2730344pbc.55 Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method. </code></pre> <p>When i use parent::CI_Controller(); i get a fatal error Fatal error: Call to undefined method CI_Controller::CI_Controller() in C:\wamp\www\test\application\controllers\email.php on line 6 Though i am using php 5.4.3</p> <p>Please let me know what i am missing here.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload