Jump to content

function.mail help


justapilot

Recommended Posts

I have a PHP mail script which I use to email data from forms for various websites. Always works fine, no problem, until now. Someone wanted to replace their ASP mail form with PHP so I did. I took both pages in question and put them up on my test server and they worked fine, however when uploaded to the clients server it doesnt work. He is running ASP AND PHP on his server, he just installed PHP yesterday to handle this form, and I dont have access to it, but im sure the problem is somewhere in the php.ini file.

 

SO what happens when submit is clicked is the PHP page displays but under the thank you message it displays a hyperlink called function.mail that doesnt actually go anywhere.

 

My PHP script is below:

 

Any ideas?

 

<?php

$to = "[email protected]";

$subject = "Contact Us";

$email = $_POST['email'] ;

$message='';

$fields=array('name', 'company', 'affiliations', 'mobile_phone', 'land_phone', 'email', 'emailverify', 'address', 'address2', 'city', 'state', 'zip', 'country');

foreach($_POST as $key => $var){

    if(in_array($key, $fields)){

        $message.=$key.':  '.$var."\n";

    }

}

 

$headers = "From: $email";

$sent = mail($to, $subject, $message, $headers) ;

 

?>

Link to comment
https://forums.phpfreaks.com/topic/154745-functionmail-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.