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.

eZ debug

Timing: Jan 18 2025 16:09:54
Script start
Timing: Jan 18 2025 16:09:54
Module start 'layout'
Timing: Jan 18 2025 16:09:54
Module start 'content'
Timing: Jan 18 2025 16:09:55
Module end 'content'
Timing: Jan 18 2025 16:09:55
Script end

Main resources:

Total runtime0.6903 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 589.0313152.6250
Module start 'layout' 0.00490.0021 741.656339.4453
Module start 'content' 0.00700.6820 781.1016621.4297
Module end 'content' 0.68900.0012 1,402.531316.1641
Script end 0.6902  1,418.6953 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.4542160.0002
Check MTime0.00130.1925160.0001
Mysql Total
Database connection0.00080.109810.0008
Mysqli_queries0.629391.1654650.0097
Looping result0.00100.1482630.0000
Template Total0.663196.120.3316
Template load0.00180.260220.0009
Template processing0.661395.807520.3307
Template load and register function0.00010.018110.0001
states
state_id_array0.00030.049810.0003
state_identifier_array0.00170.251320.0009
Override
Cache load0.00160.2325460.0000
Sytem overhead
Fetch class attribute can translate value0.00090.124830.0003
Fetch class attribute name0.00130.186070.0002
XML
Image XML parsing0.00120.170430.0004
class_abstraction
Instantiating content class attribute0.00000.002780.0000
General
dbfile0.00080.1205240.0000
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
14content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 36
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs