سلام
لطفا از عنوان مناسب استفاده کنید.
<?php
if(isset($_POST['submit']) && !empty($_POST['mail'])){
$from = $_POST['mail'];
$to = isset($_POST['copy']) ? "admin@example.com, yourmail@example.com" : "admin@example.com";
$subject = $_POST['subject'];
$message = $_POST['message'];
$headers = "From: {$from}" . "\r\n" .
"Reply-To: {$from}" . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Title of document</title>
<meta charset="utf-8" />
</head>
<body>
<form action="" method="post">
Subject:<br/>
<input type="text" name="subject" value="mail subject" /><br/>
E-mail:<br>
<input type="text" name="mail" value="your email" /><br/>
Message:<br/>
<input type="text" name="message" value="your message" size="50"><br/>
<input type="checkbox" name="copy" />Send a copy<br/><br/>
<input type="submit" name="submit" value="Send">
<input type="reset" value="Reset">
</form>
</body>
</html>
آخرین ویرایش: 27-05-2014 ???? 18:50، توسط
Daniel