폼메일 발송하고 발송상태까지 확인하는 기본적인 폼 메일
<?php
$Name = "YDS"; //senders name
$email = "abc@test.com"; //senders e-mail adress
$recipient = "abcd@test2.com"; //recipient
$mail_body = "Test..."; //mail body
$subject = "Subject for reviever"; //subject
$content="test";
$header = "From: ". $Name . " <" . $email . ">\r\n"; //optional headerfields
mail($recipient, $subject, $mail_body, $header); //mail command :)
$result=mail($recipient, $subject, $content);
if($result){
echo "mail success";
}else {
//error_log($mailto, 0);
echo "mail fail";
}
?>