Welcome Guest, Not a member yet? Register   Sign In
smtp email hangs for a while, then fails
#1

[eluser]echadwickb[/eluser]
I'm having trouble with the email class. When I submit my form, the page churns for several minutes, then lets me know the send action failed. The code is executing in a LAMP environment (PHP 4.3.6, apache 1.3.41). The smtp server I'm connecting to is a Lotus Domino 7.02 server on the internal network. Here's the code (I've x'd out the company identifiable tidbits):

Code:
$email_config['protocol'] = 'smtp';
$email_config['smtp_host'] = '10.0.X.X';
$email_config['smtp_port'] = '25';
$email_config['mailtype'] = 'text';
$email_config['smtp_user'] = '';
$email_config['smtp_pass'] = '';
$email_config['smtp_timeout'] = '10';
$email_config['useragent'] = 'XXXXX Glossary';
$email_config['charset'] = 'iso-8859-1';
            
$this->email->initialize($email_config);
            
$this->email->from($this->input->post('suggestEmail'), $this->input->post('suggestName'));
$this->email->to('[email protected]');
$this->email->subject('XXXXX Glossary term suggestion');
$this->email->message('Suggested term: '.$this->input->post('termName').'Suggested Definition: '.$this->input->post('termDef').'Additional Comments: '.$this->input->post('comments'));
if($this->email->send())
{
    $suggest_form['result_msg'] = "Your suggestion was sent successfully";
}
else
{
    $suggest_form['result_msg'] = $this->email->print_debugger();
    //$suggest_form['result_msg'] = "There was a problem sending your suggestion. Please click the back button in your browser and resubmit your suggestion";
}

I get the following message from print_debugger after several minutes (like 5+):


220 XXXXXXX.XXXXX.COM ESMTP Service (Lotus Domino Release 7.0.2) ready at Thu, 14 Feb 2008 15:09:53 -0600

hello:

The following SMTP error was encountered:

from:

The following SMTP error was encountered:

to:

The following SMTP error was encountered:

data:

The following SMTP error was encountered:

The following SMTP error was encountered:
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.

User-Agent: CodeIgniter
Date: Thu, 14 Feb 2008 16:10:15 -0600
From: "XXXXX XXXXXX"
Return-Path:
To: [email protected]
Subject: XXXXXX Glossary term suggestion
Reply-To: "[email protected]"
X-Sender: [email protected]
X-Mailer: XXXXXX Glossary
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
Mime-Version: 1.0


Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Suggested term: test termSuggested Definition: test definitionAdditional
Comments: test comments

I'm currently trying to confirm that smtp works on my linux box independant of CI, but I haven't figured out how to accomplish that yet. I do know that apps written by my predecessor use smtp functions built on PEAR for error notification (though I'm not 100% sure they're working). Still it would be nice if I got an actual error message back from domino telling me what is the matter. Any ideas? Thanks.

Chad B.




Theme © iAndrew 2016 - Forum software by © MyBB