• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not sending email?

#1
[eluser]anna16[/eluser]
Hi guys

Just wondering the reason of this, not sending email?

In my constractor i have this codes like this below,
Code:
class Site extends Controller
{

  function Site()
    {
        parent::Controller();
        $this->load->library('session');
        $this->load->helper('form');
    $this->load->helper('url');
    $this->load->library('form_validation');

        $config = Array(
                'protocol' => 'mail',
                'smtp_host' => 'mail.mysite.org',
                'smtp_port' => 25,
                'smtp_user' => 'contact@mysite.org',
                'smtp_pass' => 'asdf1234',
                'mailtype' => 'html'
        );
        
        $this->load->library('email', $config);
    $this->load->model('membership/membership');
    }

and in my send email method i have this below,
Code:
function email_test()
  {
    $this->email->from('contact@mysite.org', 'Admin');
    $this->email->to('iridion_us@yahoo.com');

    $this->email->subject('Activate your account - email test');
    $this->email->message('<b>Please click the link below to activate your account at samplesite.com</b><br>user: <br>pass: <br><br><a href="http://www.mysite.org">click here</a>');
    $this->email->send();  
  }

I don't understand what is causing the problem.
Thanks in advanced.

#2
[eluser]umefarooq[/eluser]
hi user this $this->email->print_debugger() function to debug your email you will find where the error is. put it after send

#3
[eluser]Atharva[/eluser]
I believe your email is being sent, but as you are using yahoo, it may be going in spam. Have you check that? Though you should try print_debugger() as suggested above.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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