• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
send() function returns true but no email is received in the inbox

Hello all,

I am new to CodeIgniter and I am stuck in implementing the Email class.Please can anyone check my below code in order to send an email from my gmail account to the same gmail account? When I run it, it says Email sent(send() return true). But I cannot find any such email in my inbox. Can anyone suggest what the problem can be?
$config = Array(
        'protocol' => 'smtp',
        'smtp_host' => 'ssl://smtp.googlemail.com',
        'smtp_port' => 465,
        'smtp_user' => '[email protected]',
        'smtp_password' => '****',
        'mailtype' => 'html',
        'charset' => 'iso-8859-1'

    $this->load->library('email', $config);


    $this->email->from('[email protected]','Prajakta');
    $this->email->to('[email protected]');
    $this->email->subject('This is a test email');
    $this->email->message('It is working. Great!! yey');

        echo 'Your email was sent successfully';


I have Xampp running with Mercury and have set up Mercury S SMTP Server parameters. I really dont understand why the emails are not going through? Can somebody help me with this issue?

Any help would be very much appreciated.


Did you check your servers mail logs to see if it stuck there?

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.