smtp mail error: no connection

Author Message

Greg McAvoy-Jensen

Thursday 08 February 2007 5:22:09 pm

I'm having trouble getting ezpublish to send mail. I generate the email from the standard "contact us" page. No email comes through, though, and when new users register they're not being sent an email, either. The error in the log is:

[ Feb 08 2007 14:38:56 ] [192.168.1.64] eZSMTPTransport::sendMail():
Error sending SMTP mail: Not connected!

<b>System Information</b>
I'm running Debian Etch.
A port check from an external machines shows connection is refused on port 25 (I don't know if that's right or wrong for this port)
iptables has an ACCEPT policy for output
sendmail is not installed, but I just noticed exim4 is.
phpinfo() shows

Path to sendmail 	/usr/sbin/sendmail -t -i
sendmail_from	no value	no value
sendmail_path	/usr/sbin/sendmail -t -i 	/usr/sbin/sendmail -t -i 
SMTP	smtp.example.com	smtp.example.com
smtp_port	25	25

site.ini.append.php includes:

[MailSettings]
Transport=SMTP
TransportServer=smtp.example.com
TransportUser=email@example.net
TransportPassword=mypassword
AdminEmail=myemail@example.edu
EmailSender=myemail@example.edu

A simple user error, I'm sure, but I'm having trouble figuring it out. Thank you for any suggestions.
=====
Update: I haven't received any replies yet, so let me ask the question more broadly. Does it appear I've at least got php set up to handle mail properly, or should I study php's mail facility more and see what I've done wrong? Or could this be a simple permissions error? Any suggestions on where I should start? Many thanks!

Granite Horizon, Certified Developer of eZ Publish Web Solutions
Provider of the SaaS Solution Granite Horizon In The Cloud | http://granitehorizon.com/cloud
http://granitehorizon.com | +1 916 647 6350 | California USA | @granitegreg
Blog: http://granitehorizon.com/blog

Björn Dieding@xrow.de

Tuesday 27 February 2007 3:09:28 pm

check if php doesn't run in safe mode nd that the function socket connect is enbaled... All php mail settings are irrelevant if you use SMTP with eZ.

next is to simulate a SMTP session with the mailserver with

telnet smtp.example.com 25

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Greg McAvoy-Jensen

Wednesday 28 February 2007 1:38:58 pm

Thank you, Björn.

in PHP, safe mode was off, and sockets support is enabled. Here's the telnet session opening:

$ telnet smtp.example.com 25
Trying XX.XXX.XXX.XX...
Connected to smtp.example..akadns.net.
Escape character is '^]'.
220 smtp112.example.com ESMTP

Do I need to test the functionality of the telnet smtp connection with telnet commands next, or did I just need to verify that I could connect through telnet?

Granite Horizon, Certified Developer of eZ Publish Web Solutions
Provider of the SaaS Solution Granite Horizon In The Cloud | http://granitehorizon.com/cloud
http://granitehorizon.com | +1 916 647 6350 | California USA | @granitegreg
Blog: http://granitehorizon.com/blog

Michael Kress

Friday 08 February 2008 2:11:57 pm

Hello, I've got the same trouble using ez publish 4.0 under php 5.1.6.

[ Feb 08 2008 23:05:43 ] [87.777.888.999] eZSMTPTransport::sendMail():
Error sending SMTP mail: Not connected!

my site.ini.append.php looks like this:

[MailSettings]
Transport=SMTP
TransportServer=localhost
TransportUser=
TransportPassword=
AdminEmail=my@sender.email
EmailSender=my@sender.email

A normal 'telnet localhost smtp' works like a charm.

What else can I verify?
I'm using for example /user/forgotpassword
TIA
Michael

Michael Kress

Saturday 09 February 2008 12:06:06 am

Hi, I helped myself:
http://ez.no/doc/ez_publish/technical_manual/4_0/reference/configuration_files/site_ini/mailsettings/transport

Here's the solution from the above page:
<i>"Due to a bug in eZ Publish 4.0.0, you need to download the updated version of the "ezsmtp" class and replace the corresponding file in your installation in order to use an SMTP relay server for mail delivery. This bug will be fixed in the upcoming eZ Publish 4.0.1 release."</i>

Greetings
Michael

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.