CodeIgniter Forums

Full Version: Email class using smtp protocol. pls help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2

El Forum

[eluser]eironotics[/eluser]
scenario
i am developing an intranet application that can generate email alert to any recipient.
Our mail server is located in a different machine call it 192.168.20.15 and I am using a Exchange Mail Server.

Problem:
I recieve this kind of an error:
Fatal error: Maximum execution time of 60 seconds exceeded in F:\xampp\htdocs\CodeIgniter\system\libraries\Email.php on line 1704

whats this suppose to mean?
any ideas? please help..


heres my code at controller


Code:
$this->load->library('email');
        $this->load->helper('email');
    
        $config['protocol'] = "smtp";
        $config['smtp_host'] = "192.168.20.15";
        $config['smtp_user'] = "noreply@domain.com";
        $config['smtp_pass'] = "password";
        $config['smtp_port'] = "25";
        $config['charset'] = "iso-8859-1";
        $config['wordwrap'] = TRUE;
        
        $this->email->initialize($config);
        $this->email->to('aasuncion@wardhowell.com.ph');
        
        $this->email->subject('Email Test');
        $this->email->message('Testing the email class.');
        $this->email->send();

El Forum

[eluser]JGarrido[/eluser]
I've actually been having the same issue with the native emailing mechanism, but have had success with the SwiftMailer library. I'm now trying to use Redux Auth, which uses the native email library, so now I'm up against the same wall again. Developing locally, and deploying remotely (remotely, there's no problem, except that Yahoo doesn't seem to want to render the actual email body, but that's probably a different issue...).

El Forum

[eluser]JGarrido[/eluser]
I've been trying to do some dirty debugging just inserting echo statements, and so far I have the problem narrowed down to the _send_command > _send_data('EHLO '... call (the difference is my timeout occurs after 30 seconds, instead of your 60 seconds - not sure where that setting is).

Comcast actually blocked my port 25 the other day while attempting to work on this problem, I'm just hoping they don't do it again as I troubleshoot this...

El Forum

[eluser]eironotics[/eluser]
ive been searching on the bug tracker but my problem is not a bug of CI.
maybe it is how I configure my smtp?
watcha think guys? Please review my configuration? is it correct in config array?

El Forum

[eluser]JGarrido[/eluser]
Please let me know if you're able to solve this one; I wound up just configuring Redux Auth to use SwiftMailer - bypassing the native mailing function - and this should be fine for now, but I'd really like to know what causes this issue.

El Forum

[eluser]eironotics[/eluser]
yah.. i have not found the solution on the CI class. I end up configuring the php mailer using smtp and it works just fine...

El Forum

[eluser]JGarrido[/eluser]
Based on some search results on the forum, this seems to be a fairly common issue; and it seems that using a Windows OS is a common thread, I'm thinking they're all related. It'd be good to be able to submit these kinds of issues for investigation. It should probably be submitted as a bug.

El Forum

[eluser]Joseph1982[/eluser]
[quote author="eironotics" date="1219255403"]
[b]Fatal error: Maximum execution time of 60 seconds exceeded in F:\xampp\htdocs\CodeIgniter\system\libraries\Email.php on line 1704[/quote]


How can I change the Maximum Execution time in CodeIgniter? Where can I add the function call set_time_limit(0) to set the execution time as unlimited?

Regards,
Joseph.

El Forum

[eluser]soar[/eluser]
I have the same error in CI 1.7.0 - I think this is CI bug.

It looks like error in getting answers from server: script not send request, after first 220-message. I tried to emulate protocol handshaking:

Code:
220 example.com ESMTP CommuniGate Pro 5.1c.4 is glad to see you! // Nothing here
220 example.com ESMTP CommuniGate Pro 5.1c.4 is glad to see you! // And only after 2 request we have:
AUTH LOGIN

Script wait for second SMTP-server answer, SMTP-server waiting for request. Maybe problem in various line-breaks symbols ? Tested with SMTP-server on Linux and CI on Win32 web-server.

PS: sorry for my bad english

El Forum

[eluser]soar[/eluser]
Confirmed: same script working on Linux and DOn't working on Windows - tested with *nix SMTP-server.
Pages: 1 2