email bug |
[eluser]pocketmax[/eluser]
every time I try to send an email using the email lib module, the page just hangs. Heres my code... Code: $this->load->library('email'); I searched and there are about 3 or 4 previous posts about this issue but I'm totally convinced this is a bug and this is why... 1. I'm able to manually connect to port 25 on that ip using fsockopen in a separate script. 2. I telneted into port 25 on that server and did all the SMTP commands to make an email and send it to myself and it worked perfectly fine. But when I load the email lib and do such a simple routine in ci, it just hangs. When I try a different ip address that I know doesn't have smtp turned on, it returns a connection timeout error. So that tells me that it does connect but something gets screwed up along the way.
[eluser]pocketmax[/eluser]
sorry, posted this twice in http://ellislab.com/forums/viewthread/143724/ How do you delete posts if your the author of it?
[eluser]cereal[/eluser]
You have to specify user and password to connect to the smtp server, try this way: Code: $this->load->library('email');
[eluser]pocketmax[/eluser]
But I didn't have to do that before. Besides, it's smtp and all the emails are going to the same @domain.com. I'm not doing any open relay stuff. I'm just sending emails to accounts that are on the email server.
[eluser]pocketmax[/eluser]
Whats weird is I can telnet into port 25 of the mail server and using SMTP commands, I can send an email to a local account just fine but when I use CI, it just hangs.
[eluser]pocketmax[/eluser]
OK, this is an officially ridiculous bug in CI, why because my code ran fine in cakePHP... Code: $this->Email->to = '[email protected]'; OMG, this is so ridiculous. There was nothing wrong with my email server, it was ci the whole time! And after looking at some of the other posts about this, most of them either gave up or used third party plug-ins because they lost faith in ci's way of sending emails. This is so pathetic!
[eluser]g_montel[/eluser]
I'm experiencing the same problem. I'm running CI 1.7.2 on a xampp server version 1.7.3 on windows xp. I'm sending an email with the following code : Code: log_message('debug', '[Contact_model.save_contact_form_and_send_email_to_admins] before sending email'); The mail IS sent and arrives on my mailbox. But the $this->email->send() function just never returns. Here are the logs : Code: DEBUG - 2010-11-22 11:24:03 --> [Contact_model.save_contact_form_and_send_email_to_admins] before sending email The following PHP code Code: echo "trysendmail.php\n"; works, is sending the mail, and prints "success!". Any hint ? Many thanks in advance Geoffroy
[eluser]cereal[/eluser]
Set NULL in email->to() and check if the error is logged. I think the problem could be related to your using of $this->config->item() if you are running PHP 4.* then config is a reserved word: http://ellislab.com/codeigniter/user-gui...names.html bye!
[eluser]g_montel[/eluser]
I found my error. It was hunging at the following line in EMAIL.PHP Code: $this->_set_error_message('email_sent', $this->_get_protocol()); The problem is I didn't have email_lang.php in my application language folder... Hope it will help other people! Best geoffroy
[eluser]Chris abcdefg[/eluser]
dont use CI email lib its bollox and sends the wrong headers for Standard SMTP http://ellislab.com/forums/viewthread/183282/ |
Welcome Guest, Not a member yet? Register Sign In |