![]() |
fsockopen problem with email class - 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: fsockopen problem with email class (/showthread.php?tid=32500) |
fsockopen problem with email class - El Forum - 07-25-2010 [eluser]Unknown[/eluser] I've only recently started using CodeIgniter, so apologies if this is a common problem or anything. I did try searching and found a few vaguely related topics, but none of them solved the issues I'm having. I'm trying to send a simple email when a user fills out a contact form on my website, it all works perfectly when I'm working locally on my PC, but when I transfer the site to my web hosting I get this error when it's trying to send the email: Code: A PHP Error was encountered I assume this error is because my host disable fsockopen, so does anyone know an easy-ish fix for this? Thanks fsockopen problem with email class - El Forum - 07-29-2010 [eluser]eluzyon[/eluser] Actually, I'm also having the same thing happening, but randomly... sometimes it works perfectly, other times it does not! Any ideas ? Thanks! fsockopen problem with email class - El Forum - 07-29-2010 [eluser]mi6crazyheart[/eluser] @Tiestarian Can u show u'r controller code... fsockopen problem with email class - El Forum - 07-29-2010 [eluser]Unknown[/eluser] I've sorted it now. I had the "smtp_host" in my email config file set to my domain (mail.domainname.com)... but for some reason the server didn't like that. Changed the smtp server address to localhost (in the mail config file) and it now works perfectly ![]() fsockopen problem with email class - El Forum - 07-29-2010 [eluser]mi6crazyheart[/eluser] Great... |