Forum
Forms app not sending email
Hello, I have a weird situation for a client site. I can't get a form submission to send the email notification. I've tested with multiple email address and checked spam etc and the email isn't coming through.
The really odd thing is if I use the Settings > Email test the email is received fine. Also I have the Autoresponse setup and again the email is received successfully!
The send from address is the same for all 3 emails, the email address field is set to the email field. Same settings as I use for all my other Perch client websites, so I thought maybe the clients hosting was the issue, but very odd that emails are being received via other email test and autoresponse?
Diagnostic Report:
Perch: 2.8.29, PHP: 5.4.19, MySQL: 5.5.19, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (2.8.29), assets (2.8.29), categories (2.8.29), perch_forms (1.8.3)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_forms', );
PERCH_LOGINPATH: /sct_admin
PERCH_PATH: /home/content/25/5953225/html/sct_admin
PERCH_CORE: /home/content/25/5953225/html/sct_admin/core
PERCH_RESFILEPATH: /home/content/25/5953225/html/sct_admin/resources
Image manipulation: GD
PHP limits: Max upload 32M, Max POST 33M, Memory: 64M, Total max file upload: 32M
F1: 2edba60ed1f613d6dd804feb202456a2
Resource folder writeable: Yes
SCRIPT_NAME: /sct_admin/core/settings/diagnostics/index.php
REQUEST_URI: /sct_admin/core/settings/diagnostics/
DOCUMENT_ROOT: /var/chroot/home/content/25/5953225/html
HTTP_HOST: showcourttennis.com
Debug:
Debug Message
[18] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
[1] SELECT * FROM perch2_forms WHERE formKey='contactform' LIMIT 1
[1] SELECT * FROM perch2_pages WHERE pagePath='/contact.php' LIMIT 1
Building message with Dollar template
Sent email: "Show Court Tennis Contact Form" to brad@webrad.co
Using email template: /home/content/25/5953225/html/sct_admin/core/emails/.txt (txt)
Building message with Dollar template
Sent email: "Test auto reply" to hardinge@gmail.com
INSERT INTO perch2_forms_responses(responseJSON,formID,responseIP,responseSpamData) VALUES('{\"fields\":{\"name\":{\"attributes\":{\"type\":\"text\",\"id\":\"name\",\"required\":\"true\",\"label\":\"Name\"},\"value\":\"Brad Hardinge\"},\"email\":{\"attributes\":{\"type\":\"email\",\"id\":\"email\",\"required\":\"true\",\"label\":\"Email\",\"placeholder\":\"you@company.com\"},\"value\":\"hardinge@gmail.com\"},\"phone\":{\"attributes\":{\"type\":\"text\",\"id\":\"phone\",\"required\":\"true\",\"label\":\"Phone\"},\"value\":\"0414806552\"},\"comments\":{\"attributes\":{\"type\":\"textarea\",\"id\":\"comments\",\"label\":\"Comments\"},\"value\":\"Test 12:43\"}},\"files\":[],\"page\":{\"id\":\"9\",\"title\":\"Contact\",\"path\":\"\\/contact.php\",\"navtext\":\"Contact\"}}','3','150.101.153.172','{\"fields\":{\"honeypot\":\"\"},\"environment\":{\"TMPDIR\":\"\\/home\\/content\\/25\\/5953225\\/tmp\",\"PHPRC\":\"\\/home\\/content\\/25\\/5953225\\/html\\/\",\"TEMP\":\"\\/home\\/content\\/25\\/5953225\\/tmp\",\"PHP_FCGI_CHILDREN\":\"0\",\"PATH\":\"\\/sbin:\\/usr\\/sbin:\\/bin:\\/usr\\/bin\",\"PWD\":\"\\/web\\/cgi-bin\",\"SHLVL\":\"0\",\"SPI\":\"TRUE\",\"TMP\":\"\\/home\\/content\\/25\\/5953225\\/tmp\",\"PHP_FCGI_MAX_REQUESTS\":\"100000\",\"SCRIPT_NAME\":\"\\/contact.php\",\"REQUEST_URI\":\"\\/contact.php\",\"QUERY_STRING\":\"\",\"REQUEST_METHOD\":\"POST\",\"SERVER_PROTOCOL\":\"HTTP\\/1.1\",\"GATEWAY_INTERFACE\":\"CGI\\/1.1\",\"REMOTE_PORT\":\"10310\",\"SCRIPT_FILENAME\":\"\\/var\\/chroot\\/home\\/content\\/25\\/5953225\\/html\\/contact.php\",\"SERVER_ADMIN\":\"support@secureserver.net\",\"CONTEXT_DOCUMENT_ROOT\":\"\\/var\\/chroot\\/home\\/content\\/25\\/5953225\\/html\",\"REQUEST_SCHEME\":\"http\",\"DOCUMENT_ROOT\":\"\\/var\\/chroot\\/home\\/content\\/25\\/5953225\\/html\",\"REMOTE_ADDR\":\"150.101.153.172\",\"SERVER_PORT\":\"80\",\"SERVER_ADDR\":\"208.109.47.128\",\"SERVER_NAME\":\"showcourttennis.com\",\"SERVER_SOFTWARE\":\"Apache\",\"SERVER_SIGNATURE\":\"<address>Apache Server at showcourttennis.com Port 80<\\/address>\\n\",\"LD_LIBRARY_PATH\":\"\\/web\\/httpd24\\/lib\",\"HTTP_COOKIE\":\"__utmt=1; __utma=58191080.862392771.1481244325.1481244325.1481244325.1; __utmb=58191080.37.10.1481244325; __utmc=58191080; __utmz=58191080.1481244325.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)\",\"HTTP_ACCEPT_LANGUAGE\":\"en-US,en;q=0.8\",\"HTTP_ACCEPT_ENCODING\":\"gzip, deflate\",\"HTTP_REFERER\":\"https:\\/\\/showcourttennis.com\\/contact\",\"HTTP_ACCEPT\":\"text\\/html,application\\/xhtml+xml,application\\/xml;q=0.9,image\\/webp,*\\/*;q=0.8\",\"CONTENT_TYPE\":\"application\\/x-www-form-urlencoded\",\"HTTP_USER_AGENT\":\"Mozilla\\/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/54.0.2840.98 Safari\\/537.36\",\"HTTP_UPGRADE_INSECURE_REQUESTS\":\"1\",\"HTTP_ORIGIN\":\"https:\\/\\/showcourttennis.com\",\"HTTP_CACHE_CONTROL\":\"max-age=0\",\"CONTENT_LENGTH\":\"215\",\"HTTP_CONNECTION\":\"close\",\"HTTP_HOST\":\"showcourttennis.com\",\"PARENT_DOCUMENT_ROOT\":\"\\/var\\/chroot\\/home\\/content\\/25\\/5953225\\/html\",\"GD_PHP_HANDLER\":\"x-httpd-php5-4\",\"userlimit_limit\":\"50\",\"userlimit_name\":\"5953225\",\"REAL_USERNAME\":\"showcourt\",\"SUBDOMAIN_DOCUMENT_ROOT\":\"\\/var\\/chroot\\/home\\/content\\/25\\/5953225\\/html\",\"GD_ERROR_DOC\":\".errordocs\\/missing.html\",\"REDIRECT302\":\"\",\"XID\":\"5953225\",\"REAL_DOCUMENT_ROOT\":\"\\/var\\/chroot\\/home\\/content\\/25\\/5953225\\/html\",\"DOMAIN_NAME\":\"showcourttennis.com\",\"SCRIPT_URI\":\"https:\\/\\/showcourttennis.com\\/contact.php\",\"SCRIPT_URL\":\"\\/contact.php\",\"UNIQUE_ID\":\"WEoMPq3JxHEAADEfnaYAAAAQ\",\"FCGI_ROLE\":\"RESPONDER\",\"PHP_SELF\":\"\\/contact.php\",\"REQUEST_TIME_FLOAT\":1481247806.2832,\"REQUEST_TIME\":1481247806,\"argv\":[],\"argc\":0}}')
[1] SELECT * FROM perch2_forms_responses WHERE responseID='349' LIMIT 1
No ids to log.
[7] SELECT regionKey, regionHTML FROM perch2_content_regions WHERE regionPage='/contact.php' OR regionPage='*' ORDER BY regionPage DESC
Using template: /templates/pages/attributes/seo.html
[10] SELECT * FROM perch2_pages WHERE pageNew=0 AND pageHidden=0 ORDER BY pageTreePosition ASC
[1] SELECT pageTreePosition FROM perch2_pages WHERE pagePath='/contact.php' LIMIT 1
[1] SELECT pageID FROM perch2_pages WHERE pageTreePosition IN ('000-006', '000') ORDER BY pageTreePosition DESC
Using template: /templates/navigation/level1.html
[6] Using template: /templates/navigation/level2.html
Any help would be greatly appreciated.
Looking through the debug, could it be anything to do with the following line?
It doesn't seem like autoresponse email has this line and it works?
In the above path you posted the template is missing a filename and only shows an file extension.
But the most common problem is forgetting to choose the field in the form settings which contains the email address where to send auto response.
Thanks Robert, no template is selected, just text file. Also, email is definitely selected.
What happens if you select a template?
I created a HTML template to test. Selected it in form settings and put through a few tests. Same result. The email notification isn't being received but the auto-response is! Here is the debug:
Seems really odd to me. Any ideas?
Still looks like the template name is missing. That is really odd. I'm going to have to run some tests, but that won't be for a couple of days.