send email in CI |
[eluser]lamhuy300890[/eluser]
I have problem with sending email in CI. I have upload my site to host (not local host). The first code, no error, cannot send email. Code: $from = "[email protected]"; The second code, alot of error, fsockopen() ... Code: $config['protocol'] = 'smtp'; How can i solve this problem ? Thanks.
[eluser]brian88[/eluser]
did you check the user guide for the email class already? http://ellislab.com/codeigniter/user-gui...email.html Cause this is what I use. Code: if( $this->input->post() ){
[eluser]NotDior[/eluser]
Have you tried taking the $config out of your library load? I have something similar to what you are doing, but have less settings (not sending HTML FWIW). Code: $config['smtp_host'] = 'mail.myhost.com';
[eluser]lamhuy300890[/eluser]
[quote author="brian88" date="1333480796"]did you check the user guide for the email class already? http://ellislab.com/codeigniter/user-gui...email.html Cause this is what I use. Code: if( $this->input->post() ){ I have tried this one but it cannot send email. My last hosting use this simple code, it work. Now i change to another hosting (VPS use CentOS, and DirectAdmin) and cannot send email. Do i config the server to send email ? Code: $from = "[email protected]";
[eluser]brian88[/eluser]
Should work with no matter what hosting you have. Code: echo $this->email->print_debugger(); put that at the bottom of my code and see what it spits out |
Welcome Guest, Not a member yet? Register Sign In |