$this->email->send() returns nothing |
[eluser]redcloud80[/eluser]
Here I can read that there's no need to initialize something http://ellislab.com/codeigniter/user-gui...email.html Setting Email Preferences in a Config File If you prefer not to set preferences using the above method, you can instead put them into a config file. Simply create a new file called the email.php, add the $config array in that file. Then save the file at config/email.php and it will be used automatically. You will NOT need to use the $this->email->initialize() function if you save your preferences in a config file.
[eluser]TWP Marketing[/eluser]
Looking at the email library function send(), I agree it should return only true or false. I wonder if your server or php version is not converting that to numeric 1/0 or text '1'/'0'. Conditional, check for exact boolean, numeric or text output types Code: if( $this->email->send() === null )
[eluser]CroNiX[/eluser]
Also, search the forum for sending email through gmail. I think you need to use SSL, like: Code: $config['smtp_host'] = 'ssl://smtp.googlemail.com';
[eluser]CroNiX[/eluser]
[quote author="redcloud80" date="1347312980"]Here I can read that there's no need to initialize something http://ellislab.com/codeigniter/user-gui...email.html Setting Email Preferences in a Config File If you prefer not to set preferences using the above method, you can instead put them into a config file. Simply create a new file called the email.php, add the $config array in that file. Then save the file at config/email.php and it will be used automatically. You will NOT need to use the $this->email->initialize() function if you save your preferences in a config file.[/quote] I'm pretty sure there's a bug with that that hasn't been fixed and also with doing $this->load->library('email', $config). Try manually initializing it like I suggested. It definitely wouldn't hurt anything...
[eluser]redcloud80[/eluser]
I've added ssl to the smtp_host, $config['smtp_timeout'] = 5 and $this->email->initialize(); before $this->email->send(). The request never ends, it's still loading... I'm sure that the smtp server is perfectly working.
[eluser]redcloud80[/eluser]
Finally the "answer": Fatal error: Maximum execution time of 300 seconds exceeded in... Code: 3 0.0437 5008472 call_user_func_array ( ) ..\CodeIgniter.php:359
[eluser]redcloud80[/eluser]
This is how I solved Code: $config['crlf'] = "\r\n"; :\ |
Welcome Guest, Not a member yet? Register Sign In |