![]() |
Problems sending mail using SMTP - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Problems sending mail using SMTP (/showthread.php?tid=4623) |
Problems sending mail using SMTP - El Forum - 12-06-2007 [eluser]salbertson[/eluser] I am trying to send mail using SMTP but keep getting a sendmail error in my error log. I am trying to send mail using an outside mail server. Here is my email config: Code: $config['protocol'] = 'smtp'; Code: // load email library Code: sh: /usr/sbin/sendmail: No such file or directory Problems sending mail using SMTP - El Forum - 12-06-2007 [eluser]salbertson[/eluser] I found the problem. I was setting the email config array in a separate file config/email.php and this worked on my windows test box but obviously not my linux box due to case sensitivity. It needs to be named Email.php. I guess if no config settings are present the email class tries to use sendmail. Makes sense now and I hope this helps someone else. Problems sending mail using SMTP - El Forum - 01-05-2008 [eluser]Unknown[/eluser] I saw the same problem, but fixed it in a different way. I changed _ci_init_class() in Loader.php to the following: // Is there an associated config file for this class? if ($config === NULL) { $config = NULL; if (file_exists(APPPATH.'config/'.$class.EXT)) { include(APPPATH.'config/'.$class.EXT); } elseif (file_exists(APPPATH.'config/'.strtolower($class).EXT)) { include(APPPATH.'config/'.strtolower($class).EXT); } That way it checks for both the mixed and lowercase versions of the config name. I think a lot of other things are checked for this way as well. Not sure why they missed this one... |