Closed gabrielpasv closed 9 years ago
Try using a config/email.php file and see if you get the same results.
Yeah... I have done it already, didn't work :(
any idea how can I troubleshoot this? Thanks
I have same issue, can any help me?
What error do you get if you debug and dump the email error?
Trying to do that but I am not sure where to add the debug commands
Sorry benedmunds... seems like a nice lib and lot of people using but this email issue is just driving me crazy. I am building my own login system, Thanks anyway.
You can throw the debug code for register() in around here: https://github.com/benedmunds/CodeIgniter-Ion-Auth/blob/2/libraries/Ion_auth.php#L362
If you build your own, just make sure to use PHP 5.4+ and the built in password hashing and verification methods. Need to make sure you're secure.
I added the code there but it didn't show up anything :(
What did you add exactly?
echo $this->email->print_debugger();
Change it to this:
echo 'ci_use_email:'; var_dump($this->config->item('use_ci_email', 'ion_auth')); echo 'Email debugging --'; echo $this->email->print_debugger(); exit;
It didn't output nothing on screen
See part of the code
if ($this->email->send() == TRUE) {
$this->ion_auth_model->trigger_events(array('post_account_creation', 'post_account_creation_successful', 'activation_email_successful'));
$this->set_message('activation_email_successful');
return $id;
}
echo 'ci_use_email:';
var_dump($this->config->item('use_ci_email', 'ion_auth'));
echo 'Email debugging --';
echo $this->email->print_debugger();
exit;
}
put something inside the if and see if it's hitting that
If you use a gmail account there might be problems from Google, as the service is not allowing other applications (considered less secure) to use their accounts.
To send emails I am using mandrill api. And it works outside of ionAuth ... sending emails to gmail and hotmail...
when I use it with ionAuth it doesn't send email. Neither hotmail or gmail
benedmunds still no output.....
I am tried and will take some rest. Maybe I am doing something wrong and can'tfigure out
If you use CodeIgniter 3, in the config could you please try to also add: 'smtp_crypto' => 'tls' ?
I am using 2.2
then try to change the smtp_host to "ssl://smtp.mandrillapp.com" or "tls://smtp.mandrillapp.com"
Man... I finally found the problem. I tested mandrill app yesterday and it worked ok. Now somehow they suspended my account and it was not sending any email. :(
I changed to send via gmail and now all it 's working..... yikes....
I wanted to thank you all for the help. Sorry for anything...
gabriel
All good, have fun!
i am having same issue.try all above forgot password mail sent but not received at my gmail account
The best thing to do is just to create a test controller method that sends an email to work out the proper email settings.
problem in config file.but now it works ...sorry for disturbing ...thanks a lot...
What was the correct answer? for future users.
Hi,
I have read some threads with lots of people having problem with ion auth sending email. I tried to replicated their solution but I still cannot make it to work. After finally install and have ionauth running ok on my ubuntu server, now it's time to test the email validation. But it is not working
see my config
$config['use_ci_email'] = TRUE; // Send Email using the builtin CI email class, if false it will return the code and the identity $config['email_config'] = array( 'protocol' => 'smtp', 'smtp_host' => 'smtp.mandrillapp.com', 'smtp_user' => 'xxxxxx@gmail.com', 'smtp_pass' => 'my_key', 'smtp_port' => 587, 'crlf' => "\r\n", 'newline' => "\r\n" );
I have tested this config and the email was sent just fine. But through ionAuth it just doesn't work.
How can I troubleshoot it ? Where can I add some code to output info ?
Thanks