I'm struggling to get a mail() function working on a windows server.. i have the exact same script working perfectly in a unix environment but it wont work on a windows server and its got me stumped. I've spoken to the host company who's said its a script problem, and that maybe i need to specify a server name or something (??).
Here's the script i'm using:
<?php
$Organisers_Name = $HTTP_POST_VARS["Organisers_Name"] ;
$Fundraiser_Organisation = $HTTP_POST_VARS["Fundraiser_Organisation"] ;
$Tel_Work = $HTTP_POST_VARS["Tel_Work"] ;
$Fax = $HTTP_POST_VARS["Fax"] ;
$Tel_Home = $HTTP_POST_VARS["Tel_Home"] ;
$Mobile = $HTTP_POST_VARS["Mobile"] ;
$Email = $HTTP_POST_VARS["Email"] ;
$Street_Address = $HTTP_POST_VARS["Street_Address"] ;
$Suburb = $HTTP_POST_VARS["Suburb"] ;
$State = $HTTP_POST_VARS["State"] ;
$Postcode = $HTTP_POST_VARS["Postcode"] ;
$Booking_Wine = $HTTP_POST_VARS["Booking_Wine"] ;
$Booking_Shopping = $HTTP_POST_VARS["Booking_Shopping"] ;
$Booking_Merch = $HTTP_POST_VARS["Booking_Merch"] ;
$Booking_WineryTours = $HTTP_POST_VARS["Booking_WineryTours"] ;
$Booking_Sporting = $HTTP_POST_VARS["Booking_Sporting"] ;
$Booking_Dinners = $HTTP_POST_VARS["Booking_Dinners"] ;
$Booking_DiscountBook = $HTTP_POST_VARS["Booking_DiscountBook"] ;
$Booking_WineryTours = $HTTP_POST_VARS["Booking_WineryTours"] ;
$Discount_Bar = $HTTP_POST_VARS["Discount_Bar"] ;
$Email_Updates = $HTTP_POST_VARS["Email_Updates"] ;
$Postcode = $HTTP_POST_VARS["Postcode"] ;
$Text= "Organiser Name: " .$Organisers_Name ."\n" .
"Fundraiser_Organisation: " .$Fundraiser_Organisation ."\n \n" .
"Ph (Work): " .$Tel_Work ."\n \n" .
"Fax: " .$Fax ;
$From= $Organisers_Name . "<" . $Email . ">";
mail("me@here.com", "Fun Raising Registration", $Text, "From:" .$From );
?>
Even if i just use this:
<?php mail("me@here.com", "My Subject", "Line 1\nLine 2\nLine 3");?>
it wont work. Anyone have any suggestions as to how on earth i can make this work (short of shifting the site to a unix server)???
Here's the php info file if anyone is interested in seeing that:
http://www.fundraisingmelbourne.com.au/test.php
Hoping somebody can shed some light here, cos the technical support are not helping much. They put a script in the directory and said its working, but all they put is the 2nd example above, and it DOES NOT work.
thanks in advance,
Greg