Sometimes it may happen that you’ve edited all the necessary files and there is message “Your message was set” or “Sorry, the message couldn’t be sent” but you get no e-mail. In this tutorial you will learn the way to resolve issues with contact form.
First of all you will need Firefox and Firebug plugin as we will use it throughout this tutorial. You can use the following URL to see the tutorial on installing Firebug: Click to see the tutorial
You’ve uploaded the template and submitted contact form. The following message showed up but you get no e-mail: Contact form submitted!We will be in touch soon.
a) The first you need to do is to check your spam folder or try to change e-mail to different one to make sure that it is not sent.
b) When you are sure that it is sent we need to check where exactly it is sent. In this case Firebug will help us. Open your Firefox browser and press F12 to open Firebug console
Then you need to press “Net” tab in Firebug console and see the list of files
When you press submit button you will get the following file in the list: “MailHandler.php”
Now you need to show all the contents of this file in Firebug and see tab “Post” in the file menu
Please look at the image provided in details – you can see here what is post by contact form, e.g.:
- email ww@ww.cc (the field e-mail and the content, the one that user submit)
- fax nope (the field fax and the content, the one that user submit, as you can see it is not enabled in this template)
- message Message Message Message Message Message Message Message (the field message and the content, the one that user submit)
- name My Name (the field name and the content, the one that user submit)
- phone 10110103323 (the field phone and the content, the one that user submit)
- state nope (the field state and the content, the one that user submit)
- stripHTML true (this is e-mail option, we will not discuss it as it is not related to our tutorial)
- owner_email support@guardlex.com (This is the most important message, the one we need to check. It shows us where our mail is sent, in some cases you may get # instead of e-mail)
support@guardlex.com is the default e-mail and you need to update it, now as you know the e-mail to change you can just open files and search for it, change it to any e-mail you need.
Sometimes you can see # instead of e-mail – it means that you need to locate # next to owner e-mail and update it
In dependence of the template, e-mail can be set in following files:
- forms.js
- index.html (or your appropriate contact form page)
- scripts.js
- contact.js
- You should understand that you need to update e-mail just one time and in the only file. In case you’ve updated e-mail but you can see that it is still same in Firebug console then it means you’ve updated incorrect file – roll back changes and seach for proper e-mail to change
- The most important you should know is that you DO NOT need to edit any PHP files in case you have folder “bin”/”bat” folder in your “site”/”site_pro” folder.
c) If the e-mail is set properly but when you open firebug console and see the following message on tab “Response”: mail failed
Regularly it means that your PHP doesn’t support “headers”. You need to open your PHP file located in folder “bin” or “bat” and locate smilar line at the end:
if(!mail($owner_email, $subject, $messageBody, $headers)){
and remove “headers” to look as it follows:
if(!mail($owner_email, $subject, $messageBody)){
d) If you get some other messages in Firebug console like error messages, or just some script it means that you have set incorrect file (PHP or ASP), you need to contact your hosting provider and find out if you have ASP or PHP server and then set proper processing file