![]() |
Email config file - 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: Email config file (/showthread.php?tid=50383) |
Email config file - El Forum - 03-24-2012 [eluser]Glazz[/eluser] Hello, I don't know if it is a bug or something but if i have the file email.php or Email.php inside the config folder with my email settings, they never get loaded, since i get the error that i don't have php setup correctly Quote:Unable to send email using PHP mail(). Your server might not be configured to send mail using this method. But if i use the Code: $this->email->initialize($config); It works fine. The config array is the same so the settings are correct, the problem must be on CI side, but mehhh not sure. Email config file - El Forum - 03-24-2012 [eluser]InsiteFX[/eluser] I have heard of this before and I think it's a bug in the way the email config file is being loaded, It has also happened to me before. So now I use switf mail or phpmailer. Email config file - El Forum - 03-24-2012 [eluser]Glazz[/eluser] The weird thing is that the file is loaded, but the variables are not being set... Yeah i was thinking on using Swift mailler, thank you anyway ![]() Email config file - El Forum - 03-27-2012 [eluser]Chathuranga Tennakoon[/eluser] i have made a blog post to send email with codeigniter using gmail server. please refer the following code.sometimes it may be helpful for you ![]() Code: <?php Email config file - El Forum - 05-23-2012 [eluser]Shella[/eluser] @Glazz I read that you avoid the bug using Code: $this->email->initialize($config); I didn't understand where exactly you put this codeline. Sorry, very newbie into codeigniter. Thanks! Email config file - El Forum - 05-23-2012 [eluser]Glazz[/eluser] [quote author="Shella" date="1337771240"]@Glazz I read that you avoid the bug using Code: $this->email->initialize($config); I didn't understand where exactly you put this codeline. Sorry, very newbie into codeigniter. Thanks![/quote] Try that in your controller, instead of having the email class loading the file automatically, that doesn't work properly, you can include the email.php file yourself using include or require something like Code: require APPPATH . 'config/email.php'; Code: $this->email->initialize($config); Hope i make it clear for you . Email config file - El Forum - 05-23-2012 [eluser]Shella[/eluser] Thank you, it worked well ;-) Hope this bug is gonna be fixed. Cheers |