Forums / Install & configuration / [4.2] How to debug forms that send e-mails?
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
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.
Monday 09 May 2011 2:16:27 pm
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.