close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

It's working on test site, now on live site and not working

Thread began 2/01/2010 6:39 pm by mac188476 | Last modified 2/04/2010 5:20 pm by Eric Mittman | 1504 views | 8 replies |

mac188476

It's working on test site, now on live site and not working

Hi support

Having got a website tested and ready for my client, only a contact form needed to complete and we decided on the WA Contact Form Solution Pack (CFSP).

What a great product, simple to follow instructions and up and running in ten mins using my website as a test facility. My client was very happy with the look and feel of the contact form and the security features. We tested over two days on my website, hosted with Fasthosts here in the UK, and both the client and I received these test emails.

We decided to go live tonight and upload to the client website, also hosted by Fasthosts as part of my reseller package, therefore same server.

Here in lies the rub, CFSP does not work on the client website, checked that I have upload all the exact same files that were uploaded to my server, in fact resent the files again, but no luck. We get the normal thank you for sending paged displayed as if the email was sent, but no emails arrive.

Went back to my test site and checked, assuming it was a Fasthost issue but the form on that site still works fine!

It must be something very simple that I am missing, can't see the wood for the trees at the moment, any ideas??

Regards Mac

Sign in to reply to this post

Eric Mittman

You may need to update the mail server value that you are using in your clients site, if the mail servers are specific to the domains then it would need to be updated for it to work correctly. This should be the first thing to check.

If you are getting to the thank you page then it seems that the code is executing alright. If the code is exactly the same and the mail server does not need to be adjusted you may need to speak to the host to see if there are any logs relating to the testing of the non working page.

Sign in to reply to this post

mac188476

Eric - Thanks for your quick response.

>>if the mail servers are specific to the domains then it would need to be updated for it to work correctly.<<

I have at the same time instigated a support ticket with the host, I will keep you informed of progress. - Mac

Sign in to reply to this post

mac188476

I have had the following response from my hosting company:

"Please include a -f parameter within the mail function of your script. If this is absent the emails generated may be picked up as spam by our outgoing mail server"

I have been unable to locate either the $email_from or the sendmail_from functions in any of the scripts with the contact form solution pack.

My host gave the following example:

<?php
ini_set("sendmail_from", "user@yourdomain.com");
mail($email_to, $email_subject, $email_message, $headers, "-fuser@yourdomain.com");
?>

Does this make sense to anyone?

Sign in to reply to this post

Eric Mittman

You could do the ini set inside of the Universal Email code that is on the contact us page. You can put it in just before the UE setting of the recipient to the globals value, here is what the code chunk should look like:

php:
<?php

if ((($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])) > 0) && isset($_POST)))     {
  
//WA Universal Email object="mail"
  //Send Loop Once Per Entry
ini_set("sendmail_from""".((isset($_POST["Email_address"]))?$_POST["Email_address"]:"")  ."");
  
$RecipientEmail "".($WAGLOBAL_Contact_Email_To)  ."";include("WA_Universal_Email/WAUE_contact_1.php");
  
//Send Mail All Entries
  
if ("index.php"!="")     {
    
header("Location: thankyou.php");
  }
}
?>



To modify the mail call you need to edit the WA_Universal_Email > mail_PHP.php file. In here find do a search for the line that stars like this:

php:
$mailObj = mail($mailTo,$mailSubject,$mailContent,$mailHeader



Update this line of code to look like this:

php:
$mailObj = mail($mailTo,$mailSubject,$mailContent,$mailHeader, "-f" . "".((isset($_POST["Email_address"]))?$_POST["Email_address"]:"")  .""));



I think this will meet the needs of the host to set the send mail from value and add in the -f parameter into the mail call.

Sign in to reply to this post

mac188476

Hi Eric

Thanks for the response, unfortunately after adding the code I get the following error:

Parse error: syntax error, unexpected ')' in /home/fhlinux194/g/guyedwardes.com/user/htdocs/WA_Universal_Email/mail_PHP.php on line 254

Which is the replaced line of code suggested.

Mac

P.S. The host has provided the following knowledgebase article to assist if that helps: ?article_id=65

Sign in to reply to this post

Eric Mittman

Sorry about that, it is just like the error says, there is an extra ) at the end of the function call. You should update this line of code to be like this instead:

php:
$mailObj = mail($mailTo,$mailSubject,$mailContent,$mailHeader, "-f" . "".((isset($_POST["Email_address"]))?$_POST["Email_address"]:"")  ."");



That is what I get for cutting and pasting, I'll be paying more attention next time.

Sign in to reply to this post

mac188476

Eric - thanks for your input, it cured the problen and now it's working great! As I said earlier an excellent product, worth every penny. - Mac

P.S. A supplemental question, not urgent:

My client wishes to add content to certain pages and I thought that your CMS package would be appropriate. I already own CMS and see that CMS has its own WA_Golbals, will they conflict and if so what are the areas I need to focus on to integrate CMS with this contact form solution?

Regards Mac

Sign in to reply to this post

Eric Mittman

It might be best to setup a new DW site for the CMS and make it a sub folder from your main site, this way you can keep two distinct copies of the globals and connections files. Rather than creating a new db to hold the Power CMS tables though you should just add the tables to your existing db. You could combine the globals file so long as you did not overwrite any settings from either one.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...