B. Aguirre C. - 2007-03-10 23:40:56
//Setup the mail format
$recipient = "vizionfe@yahoo.es"; // Recipient mail address
$subject = "Contact Form"; // subject of the mail
$mailheaders = "MIME-Version: 1.0\r\n";
$mailheaders .= "Content-type: text/plain; charset=iso-8859-1\r\n";
$mailheaders .= "From: $_POST[email]\r\n"; // from address fo the person
NOT REPLY-TO?
$mailheaders .= "Reply-To: $_POST[email]\r\n"; // reply field
//TO SEE REPEAT ?
$mailusers = "MIME-Version: 1.0\r\n";
$mailusers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
$mailusers .= "From: vizionfe@yahoo.es\r\n"; // from address fo the person
//Send the contact form
$sent=mail($recipient, $subject, $msg,$mailheaders); // this function to send mail to the recpient
$sent=mail("$_POST[email]", $subject, $msg,$mailusers); // this function to send mail to the recpient
if($sent)
{
$rs="Your message has been sent successfully "; // display this message if the message sent successfully
return $rs;
}
else
{
$rs="Sorry, Some problem in server please try again later"; // display the error message if the message not sent
return $rs;
}
}
};