Tank Auth Email Problem |
[eluser]fillipe.bs[/eluser]
Hello Guys, I'm starting with CodeIgniter. I read the UserGuide and I've used the search without sucess. So, that is the problem, Tank Auth is installed in my CodeIgniter project, but when I try to register, the registration email is not sent. I edited Email.php in system/libraries to this: Code: var $useragent = "CodeIgniter"; The file email.php in application/config is this: Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); But if i try to send an simple email (with the same system/libraries/Email.php) like this: Code: //Testanto o Email Any idea of what is the problem?
[eluser]fillipe.bs[/eluser]
Guys, removing the email.php (config file) and setting the variables in Email class directly, all works, I dont know if there is an bug of CodeIgniter 2.0 or in Tank Auth, or if i'm a realy noob. So, if you culd help me i'll be thankfull.
[eluser]Unknown[/eluser]
I had the same problem and couldnt figure it out either. Finally i tried what fillipe.bs suggested and it helped resolve the problem. But make sure that for Tank Auth to work you set all the expected parameters in the email class. (system/libraries/email.php) Code: var $useragent = "CodeIgniter"; Once i got this working - i tested the test mail. Here is a simple test mail controller - and it works for the scenarios where you set everything in the Email.php (system/libraries/email.php) as follows Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); And also works fine without loading everything in the Email.php class and passing it as a configuration array. Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); Once again - $this->email->set_newline("\r\n") appears in the test and i do consider it important now. Unfortunately one scenario that still needs investigation is setting the config in the email.php (applications/config/email.php) - which i have read else where isnt working - a problem with code igniter or tank auth - no idea, but after exhausting myself with my trail and errors all day - just didnt have the energy to test this and going to take a hint from other threads which says to delete the config/email.php. However i am going to need to make this work with Mercury mail (XAMPP on Win7) on localhost since my gmail ports are blocked at office - so will post those details here as well for anyone else like me trying out the same. But i did restart apache after my changes - so think that might help too though not necessarily! Reference threads: http://ellislab.com/forums/viewthread/17485 http://ellislab.com/forums/viewthread/183864/ http://ellislab.com/forums/viewthread/132443/
[eluser]Lechuss[/eluser]
Added $this->email->initialize(); to _send_email() fixed this for me.
[eluser]Unknown[/eluser]
Hi, you can try in your config/email.php file: $config['protocol'] = 'smtp'; $config['smtp_host'] = 'ssl://smtp.googlemail.com'; $config['smtp_port'] = 465; $config['smtp_user'] = '[email protected]'; // your email $config['smtp_pass'] = 'xxx'; // your password $config['mailtype'] = 'html'; $config['charset'] = 'iso-8859-1'; I know this is an old thread, but maybe this help someone... |
Welcome Guest, Not a member yet? Register Sign In |