close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

tweeking contact form script for my server

Thread began 1/16/2011 6:22 am by j.dobres416289 | Last modified 1/17/2011 1:12 pm by j.dobres416289 | 2657 views | 6 replies

j.dobres416289

tweeking contact form script for my server

Please help!

I have set up the contact form script on a site I am building and thought all was OK except that I have noticed I get the 'thank you' page acknowledging an email has been sent even if an email hasn't been sent!?(when all fields have been correctly filled in)
It only appears to work(send an email to me) if I enter my own email address in the email address field on the contact form,in which case it sends an email to me - not a lot of use for customer enquiries as they will obviously all have a different email address to me!?

The link is here
contactus.php

I have looked at the server (fasthosts) help page and it gives some help - however I am uncertain how to edit the contact form code based on the help!? - could you give please explain EXACTLY the changes I would have to make to the contactform script based on the guidance below?

Full info at
L3Nuby8xL3RpbWUvMTI5NTE4NTYxMS9zaWQvbDh6NFRja2s%3D


Extract from Fasthosts help

To prevent spam being sent through our webservers, there are certain conditions that must be met before our SMTP servers will send the email.
1.Email must be sent to, or from, an existing email address hosted by Fasthosts. This must be a mailbox on the same domain name on which the form to mail script is being hosted.
2.To stop misuse of your form by third parties the sendmail_from variable should be set to your Fasthosts hosted email address. While access to the php.ini file is restricted on our shared environment, you can sent this variable using the ini_set() command, shown below.
3.A fifth parameter, -f, should be added to the sendmail function. This will set the name of the from email address.
In its basic form, a simple sendmail script will look like this:
<?php
ini_set("sendmail_from", "user@yourdomain.com");
mail($email_to, $email_subject, $email_message, $headers, "-fuser@yourdomain.com");
?>
Provided that your form to mail script meets the requirements above, you should have no problems.

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...