PHP formmail script doesn't work

This is a discussion on "PHP formmail script doesn't work" within the PHP Forum section. This forum, and the thread "PHP formmail script doesn't work are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Apr 19th, 2007, 13:21
New Member
Join Date: Apr 2007
Location: Plymouth
Age: 25
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
PHP formmail script doesn't work

Hi All

I've got he following script which is meant to send me an email from the online form...

It redirects users to the thanks url properly but i never get the email...

Any ideas?

Code: Select all
<?php
 
// Configuration Settings
$SendFrom =    "Form Feedback <plymouth-kolts@blueyonder.co.uk>";
$SendTo =      "Jonathan Garnett-Smith <plymouth-kolts@blueyonder.co.uk>";
$SubjectLine = "Players Player";
$ThanksURL =   "http://devoted.to/kolts";
//confirmation page
$Divider =     "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";
 
// Build Message Body from Web Form Input
$MsgBody = @gethostbyaddr($REMOTE_ADDR) . "\n$Divider\n";
foreach ($_POST as $Field=>$Value)
   $MsgBody .= "$Field: $Value\n";
$MsgBody .= $Divider . "\n" . $HTTP_USER_AGENT . "\n";
$MsgBody = htmlspecialchars($MsgBody);  //make content safe
 
// Send E-Mail and Direct Browser to Confirmation Page
mail($SendTo, $SubjectLine, $MsgBody, "From: " . $SendFrom);
header("Location: $ThanksURL");
?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Apr 19th, 2007, 21:11
Junior Member
Join Date: Jun 2006
Location: Wisconsin
Age: 30
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Re: PHP formmail script doesn't work

I have had similar problems using the mail function, I now use this http://www.phpguru.org/static/htmlMimeMail5.html and it works great. Its easy to use and I've had no problems since switching to it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
email, formmail, script

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
help with getting this form to work with formmail.pl newoptical Web Page Design 2 May 24th, 2007 23:36
ok i have £200 uk i need some one to do some php and script work rubyk9 Job Opportunities 0 Mar 26th, 2007 13:30
Formmail.asp help MarkSensei Classic ASP 1 Jan 22nd, 2006 22:48
Need HELP - with formmail bplatosz Web Page Design 4 Nov 21st, 2005 19:01


All times are GMT. The time now is 16:15.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42