Send an Email PHP

<?

$top     ="domain@domain.com";

$subject = 'Subscribe';
$headers = "From: $_SERVER[HTTP_HOST] <admin@domain.com>\r\nReply-To: domain@domain.com";

$message = "Hello World!\n\nThis is my first mail.";

$mail_sent = @mail( $to, $subject, $message,$headers );
echo $mail_sent ? "Mail sent" : "Mail failed";

?> 

0 komentar: