Evo i PHP skripta iako bi ona trebala biti dobra...
<?php
error_reporting(0); // disable all error reporting
set_time_limit(120); // let script run for no more than 2 minutes
$emailTo = "
[email protected]";
$name = $_POST['name'];
$from = $_POST['fromEmail'];
$subject = $_POST['subject'];
$msg = $_POST['msg'];
if(!empty($_POST))
{
$headers = "";
$headers .= "";
$date = date("F j, Y", time()); // Grab todays date
// This block is the actual message that is sent in the email
$email_info .= "Below is the visitors contact info and message.\n\n";
$email_info .= "Visitor's Info:\n";
$email_info .= "-----------------------------------------\n";
$email_info .= "Name: " . $from . "\n";
$email_info .= "Date Sent: " . $date . "\n\n";
$email_info .= "Message\n";
$email_info .= "-----------------------------------------\n";
$email_info .= "" . $msg . "\n";
// End email block
// Mail headers, do not alter
$mailheaders = "From: " . $from . " <" . $name . "> \n";
$mailheaders .= "Reply-To: " . $from . "\n\n";
if(mail($emailTo, $subject, $email_info, $mailheaders))
{
print "resultCode=SENT";
}
else
{
print "resultCode=ERROR";
}
}
?>