Forum

Thread tagged as: Problem, Configuration, Forms

Form app: Send response via email not working

Hi, I have installed a contact form on https://hilanorte.lapatineta.com/contacto.html Everything works fine except I do not receive any email in my inbox. I had setup form settings and tested e-mail in general settings (it said it's fine).

Here is my diagnostics:

Perch: 2.7.9
Production mode: Production (100)
Installed apps: content (2.7.9), assets (2.7.9), categories (2.7.9), perch_blog (4.5.4), perch_events (1.9), perch_forms (1.8.2)
DB driver: PDO
DB tables: perch2_categories, perch2_category_counts, perch2_category_sets, perch2_content_index, perch2_content_items, perch2_content_regions, perch2_events, perch2_events_categories, perch2_events_to_categories, perch2_forms, perch2_forms_responses, perch2_navigation, perch2_navigation_pages, perch2_page_templates, perch2_pages, perch2_resource_tags, perch2_resources, perch2_resources_to_tags, perch2_settings, perch2_user_privileges, perch2_user_role_privileges, perch2_user_roles, perch2_users
Users: 1
App runtimes:
<?php
    $apps_list = array(
        'content', 
        'categories',
        'perch_blog',
        'perch_forms',
        'perch_events',
    );
Scheduled tasks for perch_blog: delete_spam_comments (1440 mins)
Scheduled tasks for perch_events: update_category_counts (60 mins)
Editor plug-ins: markitup
H1: 8c6039cbc8371877bb368816a9bdb92a
L1: 7e44f32d2203065123015a2516b82a7a
headerColour: #ffffff
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 0
content_collapseList: 1
lang: en-gb
update_2.7.9: done
latest_version: 2.5.3
on_sale_version: 2.7.9
perch_events_update: 1.8
headerScheme: light
perch_blog_post_url: /blog/post.php?s={postSlug}
perch_blog_slug_format: {postTitle}
perch_blog_akismet_key:
perch_blog_max_spam_days: 0
perch_events_detail_url: /events/event.php?event={eventSlug}
dashboard: 0
hide_pwd_reset: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
perch_blog_comment_notify: 0
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: raulserrano
PERCH_DB_SERVER: mysql.hilanorte.lapatineta.com
PERCH_DB_DATABASE: hilanorte
PERCH_DB_PREFIX: perch2_
PERCH_TZ: UTC
PERCH_EMAIL_FROM: serranocervantes@gmail.com
PERCH_EMAIL_FROM_NAME: Raul Serrano
PERCH_LOGINPATH: /perch
PERCH_PATH: /home/raulserrano/hilanorte.lapatineta.com/perch
PERCH_CORE: /home/raulserrano/hilanorte.lapatineta.com/perch/core
PERCH_RESFILEPATH: /home/raulserrano/hilanorte.lapatineta.com/perch/resources
PERCH_RESPATH: /perch/resources
PERCH_HTML5: 1
PERCH_RUNWAY:
PERCH_ERROR_MODE: DIE
PERCH_DATE_LONG: %d %B %Y
PERCH_DATE_SHORT: %d %b %Y
PERCH_TIME_SHORT: %H:%M
PERCH_TIME_LONG: %H:%M:%S
PERCH_DEBUG:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /home/raulserrano/hilanorte.lapatineta.com/perch/templates
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_RWD:
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
HOSTING SETTINGS

PHP: 5.4.36
Zend: 2.4.0
OS: Linux
SAPI: cgi-fcgi
Safe mode: not detected
MySQL client: mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $
MySQL server: 5.1.56-log
Extensions: Core, date, ereg, libxml, pcre, sqlite3, filter, mbstring, SPL, PDO, Reflection, pdo_sqlite, hash, session, cgi-fcgi, bcmath, bz2, calendar, ctype, curl, dom, standard, ftp, gd, gettext, exif, iconv, imap, json, mcrypt, mysqlnd, mysqli, openssl, pcntl, pdo_mysql, posix, pspell, mysql, SimpleXML, soap, sockets, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib, imagick, mhash
GD: Yes
ImageMagick: Yes
PHP max upload size: 64M
PHP max form post size: 65M
PHP memory limit: 90M
Total max uploadable file size: 64M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: No
PATH: /bin:/usr/bin:/sbin:/usr/sbin
RAILS_ENV: production
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
REQUEST_URI: /perch/core/settings/diagnostics/?extended
QUERY_STRING: extended
REQUEST_METHOD: GET
SERVER_PROTOCOL: HTTP/1.1
GATEWAY_INTERFACE: CGI/1.1
REMOTE_PORT: 50920
SCRIPT_FILENAME: /home/raulserrano/hilanorte.lapatineta.com/perch/core/settings/diagnostics/index.php
SERVER_ADMIN: webmaster@hilanorte.lapatineta.com
DOCUMENT_ROOT: /home/raulserrano/hilanorte.lapatineta.com
REMOTE_ADDR: 2.137.250.97
SERVER_PORT: 80
SERVER_ADDR: 67.205.11.233
SERVER_NAME: hilanorte.lapatineta.com
SERVER_SOFTWARE: Apache
HTTP_COOKIE: _ga=GA1.2.1086430424.1418851257; cmsa=1; PHPSESSID=t%2CjwfuILiJn7iN1hop87o0
HTTP_ACCEPT_LANGUAGE: es,en-US;q=0.8,en;q=0.6,pt;q=0.4,it;q=0.2,gl;q=0.2
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch
HTTP_REFERER: https://hilanorte.lapatineta.com/perch/core/settings/diagnostics/
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.91 Safari/537.36
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_CONNECTION: close
HTTP_HOST: hilanorte.lapatineta.com
DH_USER: raulserrano
dsid: 28467464
SCRIPT_URI: https://hilanorte.lapatineta.com/perch/core/settings/diagnostics/
SCRIPT_URL: /perch/core/settings/diagnostics/
UNIQUE_ID: VMdTbdBx6fMAAA@dT-QAAAAG
FCGI_ROLE: RESPONDER
PHP_SELF: /perch/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1422349165.7277
REQUEST_TIME: 1422349165
Raul Serrano

Raul Serrano 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

If you turn on debug for the page and submit the form, you should be able to see if the email is being sent.

Debug Message

SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='95e94b511d39542be6c56222cfa3b14c' LIMIT 1
UPDATE perch2_users SET userHash='79a582d8162cc6fa4d889e1f12b63f02' WHERE userID=1
SELECT p.privKey FROM perch2_user_privileges p
SELECT * FROM (SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID
SELECT * FROM perch2_content_regions WHERE regionID=1 LIMIT 1
SELECT * FROM perch2_pages WHERE pageID='1' LIMIT 1
SELECT * FROM perch2_content_items WHERE regionID=1 AND itemRev=23 ORDER BY itemOrder ASC
SELECT * FROM perch2_content_items WHERE regionID=1 AND itemRev=23 ORDER BY itemOrder ASC
Using template: /templates/content/formulario.html
Form not posted or did not validate
Queries: 9
Drew McLellan

Drew McLellan 2638 points
Perch Support

Is that from the page on your site where the form is after posting the form? That looks like output from the Perch control panel.

Debug Message
SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
SELECT * FROM perch2_forms WHERE formKey='contacto' LIMIT 1
SELECT * FROM perch2_pages WHERE pagePath='/contacto.html' LIMIT 1
Message sent!
INSERT INTO perch2_forms_responses(responseJSON,formID,responseIP,responseSpamData) VALUES('{\"fields\":{\"name\":{\"attributes\":{\"type\":\"text\",\"id\":\"name\",\"required\":\"true\",\"label\":\"Nombre\"},\"value\":\"Juan\"},\"email\":{\"attributes\":{\"type\":\"text\",\"id\":\"email\",\"required\":\"true\",\"label\":\"Correo electr\\u00f3nico o tel\\u00e9fono m\\u00f3vil\"},\"value\":\"aasa@asdsd.com\"},\"mensaje\":{\"attributes\":{\"type\":\"textarea\",\"id\":\"mensaje\",\"required\":\"true\",\"label\":\"Notas\",\"class\":\"required\"},\"value\":\"asasfasf\"}},\"files\":[],\"page\":{\"id\":\"1\",\"title\":\"Contacto\",\"path\":\"\\/contacto.html\",\"navtext\":\"Contacto\"}}','1','2.137.250.97','{\"fields\":[],\"environment\":{\"PATH\":\"\\/usr\\/local\\/bin:\\/usr\\/bin:\\/bin\",\"REDIRECT_HANDLER\":\"php5-cgi\",\"REDIRECT_STATUS\":\"200\",\"UNIQUE_ID\":\"VMdWftBx6fMAAEOtKgoAAAAE\",\"SCRIPT_URL\":\"\\/contacto.html\",\"SCRIPT_URI\":\"https:\\/\\/hilanorte.lapatineta.com\\/contacto.html\",\"HTTP_HOST\":\"hilanorte.lapatineta.com\",\"HTTP_CONNECTION\":\"keep-alive\",\"CONTENT_LENGTH\":\"153\",\"HTTP_CACHE_CONTROL\":\"max-age=0\",\"HTTP_ACCEPT\":\"text\\/html,application\\/xhtml+xml,application\\/xml;q=0.9,image\\/webp,*\\/*;q=0.8\",\"HTTP_ORIGIN\":\"https:\\/\\/hilanorte.lapatineta.com\",\"HTTP_USER_AGENT\":\"Mozilla\\/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/40.0.2214.91 Safari\\/537.36\",\"CONTENT_TYPE\":\"application\\/x-www-form-urlencoded\",\"HTTP_REFERER\":\"https:\\/\\/hilanorte.lapatineta.com\\/contacto.html\",\"HTTP_ACCEPT_ENCODING\":\"gzip, deflate\",\"HTTP_ACCEPT_LANGUAGE\":\"es,en-US;q=0.8,en;q=0.6,pt;q=0.4,it;q=0.2,gl;q=0.2\",\"HTTP_COOKIE\":\"_ga=GA1.2.1086430424.1418851257; cmsa=1; PHPSESSID=2SFCW7Vm3W6OJUNjs-nNU1\",\"SERVER_SIGNATURE\":\"\",\"SERVER_SOFTWARE\":\"Apache\",\"SERVER_NAME\":\"hilanorte.lapatineta.com\",\"SERVER_ADDR\":\"67.205.11.233\",\"SERVER_PORT\":\"80\",\"REMOTE_ADDR\":\"2.137.250.97\",\"DOCUMENT_ROOT\":\"\\/home\\/raulserrano\\/hilanorte.lapatineta.com\",\"SERVER_ADMIN\":\"webmaster@hilanorte.lapatineta.com\",\"SCRIPT_FILENAME\":\"\\/home\\/raulserrano\\/hilanorte.lapatineta.com\\/contacto.html\",\"REMOTE_PORT\":\"51123\",\"REDIRECT_URL\":\"\\/contacto.html\",\"GATEWAY_INTERFACE\":\"CGI\\/1.1\",\"SERVER_PROTOCOL\":\"HTTP\\/1.1\",\"REQUEST_METHOD\":\"POST\",\"QUERY_STRING\":\"\",\"REQUEST_URI\":\"\\/contacto.html\",\"SCRIPT_NAME\":\"\\/contacto.html\",\"ORIG_SCRIPT_FILENAME\":\"\\/dh\\/cgi-system\\/php54.cgi\",\"ORIG_PATH_INFO\":\"\\/contacto.html\",\"ORIG_PATH_TRANSLATED\":\"\\/home\\/raulserrano\\/hilanorte.lapatineta.com\\/contacto.html\",\"ORIG_SCRIPT_NAME\":\"\\/cgi-system\\/php54.cgi\",\"PHP_SELF\":\"\\/contacto.html\",\"REQUEST_TIME_FLOAT\":1422349950.867,\"REQUEST_TIME\":1422349950}}')
SELECT * FROM perch2_forms_responses WHERE responseID='39' LIMIT 1
SELECT regionKey, regionHTML FROM perch2_content_regions WHERE regionPage='/contacto.html' OR regionPage='*' ORDER BY regionPage DESC
Drew McLellan

Drew McLellan 2638 points
Perch Support

So it looks like the email is being sent. Your next step is to look into the delivery from your server.

Solved by Dreamhost:

Hello Raul,

Thanks again for contacting technical support at Dreamhost! Looking over
this matter further for you, the issue appears relating to the php
parameter below.

define('PERCH_EMAIL_FROM', 'serranocervantes@gmail.com');

As this address would need to be a fully hosted email address set up with
us on the account if using PHP mailer services. If wanting to use a
gmail address, you will need to use SMTP settings for the specific Gmail
address.

We verified this set up via the config file of the perch service.

agba:/home/raulserrano/hilanorte.lapatineta.com/perch# cat
config/config.php

As for the notice sent from perch, perch does not have access to mail
logs and would best to ensure the configuration for the email address is
correct to be certain it's working successfully.

Hope this helps! If you have any other questions or concerns, feel free
to contact us back anytime!

Thank you kindly,

Working!