[4.2] How to debug forms that send e-mails?

Author Message

Jeroen van Duffelen

Thursday 05 May 2011 2:59:16 pm

I have eZ Publish 4.2 on one server, I have to move it to another server. I copied everything and it works except for the contact form that needs to send an e-mail.

The only thing that does not happen is sending the e-mail. When I submit the form the data ends up in the database and I can access it through the admin interface... but the form doesn't send the mail :S

How to debug this thing? I have checked the server logs and the ez error logs but no errors show up.

I am sending mail through php mail, I am not using SMTP. I have already tested if php mail works correctly with a standalone script and that works fine.

Greg McAvoy-Jensen

Thursday 05 May 2011 11:37:39 pm

Jeroen,

Your main tool here is DebugRedirection. You can also debug mail using the Transport setting, set to file. Lastly, consider reading Paul's great article on forms. Good luck!

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

Jeroen van Duffelen

Friday 06 May 2011 9:21:29 am

Thanks Greg! Awesome you responded that quickly!

So I changed the transort to file and the mail is logged correctly. So far so good. I use the default transport setting again and test with the DebugRedirection. The mail doesn't get send and I do not see an error on the redirect page...

It's difficult to find which classes this information collection module uses to send out the mail. If I could find out which steps it goes through I can manually debug.

Greg McAvoy-Jensen

Monday 09 May 2011 2:16:27 pm

Jeroen,

If you have debug redirection on it will step you through the process with a Redirect button at the top of the page. The URL construction will reveal which classes are used.

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

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 02:47:03
Script start
Timing: Jan 18 2025 02:47:03
Module start 'layout'
Timing: Jan 18 2025 02:47:03
Module start 'content'
Timing: Jan 18 2025 02:47:03
Module end 'content'
Timing: Jan 18 2025 02:47:03
Script end

Main resources:

Total runtime0.7242 sec
Peak memory usage4,096.0000 KB
Database Queries61

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0090 589.2031152.6406
Module start 'layout' 0.00900.0053 741.843839.4844
Module start 'content' 0.01430.7083 781.3281550.9375
Module end 'content' 0.72260.0015 1,332.265612.1250
Script end 0.7241  1,344.3906 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.4997160.0002
Check MTime0.00140.1974160.0001
Mysql Total
Database connection0.00080.109110.0008
Mysqli_queries0.666592.0278610.0109
Looping result0.00060.0863590.0000
Template Total0.686394.820.3431
Template load0.00250.349020.0013
Template processing0.683794.414620.3419
Template load and register function0.00010.019510.0001
states
state_id_array0.00200.275510.0020
state_identifier_array0.00140.188820.0007
Override
Cache load0.00210.2939220.0001
Sytem overhead
Fetch class attribute can translate value0.00070.097020.0004
Fetch class attribute name0.00220.297550.0004
XML
Image XML parsing0.00080.111920.0004
class_abstraction
Instantiating content class attribute0.00000.003060.0000
General
dbfile0.00090.1200180.0000
String conversion0.00000.001340.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
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs