PHP mail() works but $this->email->send() does not |
[eluser]louisl[/eluser]
If it sends from PHP's mail() function you shouldn't need an email config.
[eluser]InsiteFX[/eluser]
See if this will fix it! Code: class Sendemail extends CI_Controller { Now I see that your using the email.php file so you do not need the above. InsiteFX
[eluser]louisl[/eluser]
[quote author="dangermark" date="1301976185"]Isn't that beside the point though?[/quote] What I mean is you may be unnecessarily changing defaults, if mail() works then so should CI without any server related config changes. A typical email of mine is simply this:- Code: $this->load->library('email');
[eluser]InsiteFX[/eluser]
@louis! There is no defaults for SMTP you have to set the config parameters for SMTP to work correct! InsiteFX
[eluser]louisl[/eluser]
[quote author="InsiteFX" date="1301977675"]@louis! There is no defaults for SMTP you have to set the config parameters for SMTP to work correct! InsiteFX[/quote] But the default protocol is mail doesn't that route through PHP the same as mail() to whatever is set in php.ini? Anyhow, something else to try if none of the above works give this config a go:- Code: $config['protocol'] = "smtp";
[eluser]dangermark[/eluser]
That actually worked. Also changed Code: $config['smtp_timeout'] = 5; // SMTP Timeout (in seconds). ( None ) Code: $config['smtp_timeout'] = '5'; // SMTP Timeout (in seconds). ( None ) Thanks for your help.
[eluser]bhumes[/eluser]
[quote author="louisl" date="1301980669"] Code: $config['newline'] = "\r\n"; This. If you are using a Windows server for SMTP, you need to set the line breaks to the above. Otherwise, it will timeout. |
Welcome Guest, Not a member yet? Register Sign In |