AghaMohsen
دوشنبه 21 مرداد 1392, 13:48 عصر
مشکل این کد ساده چیه ؟ برای ارسال ایمیل :
<?php
if(!$_POST['sendMessage'])
{
header("location:Contact.html");
}
$to = "aghamohsen77@mohsen-app.ir";
$subject = $_POST[sendername];
$from = $_POST[sendermail];
$message = $_POST[message];
$headers = "From:".$from;
if mail( $to, $subject, $message, $headers)
{
echo "success";
}
else
{
echo "not success";
}
?>
<?php
if(!$_POST['sendMessage'])
{
header("location:Contact.html");
}
$to = "aghamohsen77@mohsen-app.ir";
$subject = $_POST[sendername];
$from = $_POST[sendermail];
$message = $_POST[message];
$headers = "From:".$from;
if mail( $to, $subject, $message, $headers)
{
echo "success";
}
else
{
echo "not success";
}
?>