This is a discussion on "Contact form trouble" within the PHP Forum section. This forum, and the thread "Contact form trouble are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Contact form trouble
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Contact form trouble
Ok, so I recently tried to create a contact form - located at: www.virtualofficeaid.com/contactus.html
The problem is, that everything seems to work fine, except the message never really gets sent. Any help in finding the problem would be appreciated. HTML:
Last edited by Ghost; Feb 3rd, 2007 at 19:25. |
|
|
|
#2
|
|||
|
|||
|
Re: php mail Contact form trouble
http://www.php.net/function.mail
Have you checked with your hosting provider whether any special flags needs to be passed for making the php mail function work? Some providers require a valid from email address of the same domain etc |
|
#3
|
|||
|
|||
|
Re: Contact form trouble
I use godaddy, if that helps.
I don't believe they have any special protocol for PHP, seeing as how it gets passed to the confirmation PHP page fine, just that no message ever shows up in my inbox. |
|
#4
|
||||
|
||||
|
Re: Contact form trouble
Check to make sure it's not going in your junk mail folder.
|
|
#5
|
|||
|
|||
|
Re: Contact form trouble
Its not, already checked...
Does the code look sound though? |
|
#6
|
|||
|
|||
|
Re: Contact form trouble
Hi,
The code looks fine to me but it is pretty standard spam checking for your host to require that you put a valid from field at the end of your mail() function. so it could read: Note: if your server requires it to be from your server then use $to if it just requires a vaild email address use $visitormail
|
|
#7
|
|||
|
|||
|
Re: Contact form trouble
Quote:
|
|
#8
|
|||
|
|||
|
Re: Contact form trouble
just had a quick look at your host and it seems that you have to use their standard PHP-Mailer tool. Look in the support section of their site for more help.
|
|
#9
|
|||
|
|||
|
Re: Contact form trouble
Quote:
I couldn't imagine that would be the only way to get a contact form working though... |
|
#10
|
|||
|
|||
|
Re: Contact form trouble
The mail command returns 1 on success and 0 on failure - simple thing to do is to say:
$doesthiswork = mail($to, $subject, $body); print "the result was --> $doesthiswork"; That will show you if the mail command is working or not. |
|
#11
|
|||
|
|||
|
Re: Contact form trouble
It should work. I have used godaddy in the past, and unless they have changed their standards you can of course build your own PHP send mail script. I know I have in the past, or of course you can use the one they supply you with.
|
![]() |
| Tags |
| contact |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] PHP contact form redirect to same form | Posie | PHP Forum | 14 | Jan 29th, 2008 20:28 |
| help with asp contact form? | Ella | Classic ASP | 4 | Jan 2nd, 2008 00:45 |
| Contact Us Form - Help Please | tygwyn | JavaScript Forum | 4 | Sep 10th, 2007 10:36 |
| php contact form | geyids | PHP Forum | 5 | Jun 14th, 2007 16:59 |
| Need Quote Form and Contact Form | Av8er | Flash & Multimedia Forum | 5 | Oct 30th, 2003 17:14 |