Forums / Setup & design / smtp mail error: no connection

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

eZ debug

Timing: Jan 18 2025 11:11:25
Script start
Timing: Jan 18 2025 11:11:25
Module start 'content'
Timing: Jan 18 2025 11:11:26
Module end 'content'
Timing: Jan 18 2025 11:11:26
Script end

Main resources:

Total runtime0.8228 sec
Peak memory usage4,096.0000 KB
Database Queries202

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 588.8281180.8359
Module start 'content' 0.00580.6885 769.6641626.5078
Module end 'content' 0.69440.1283 1,396.1719341.4063
Script end 0.8227  1,737.5781 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.4826210.0002
Check MTime0.00150.1780210.0001
Mysql Total
Database connection0.00080.091810.0008
Mysqli_queries0.741590.12172020.0037
Looping result0.00210.25022000.0000
Template Total0.795396.720.3977
Template load0.00220.265220.0011
Template processing0.793196.398320.3966
Template load and register function0.00010.011710.0001
states
state_id_array0.00110.131510.0011
state_identifier_array0.00130.163320.0007
Override
Cache load0.00190.2344460.0000
Sytem overhead
Fetch class attribute can translate value0.00150.183740.0004
Fetch class attribute name0.00190.226770.0003
XML
Image XML parsing0.00140.169840.0003
class_abstraction
Instantiating content class attribute0.00000.002080.0000
General
dbfile0.00370.4516350.0001
String conversion0.00000.000530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 36
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs