<html>
<head>
<title>Trang goi mail</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<?php
$to = "vytien123@yaho o.com";
$from = "vytien83@yahoo .com";
$subject = "This is a test email";
$message = "Dear Vy,\n\nThis is a fake email, I hope you enjoy it.\n\nFrom Tien.";
$headers = "From: $from\r\n";
$success = mail($to, $subject, $message, $headers);
if ($success)
echo "The email to $to from $from was successfully sent";
else
echo "An error occurred when sending the email to $to from $from";
?>
</body>
</html>
// this is result when I run this page
Warning: mail() [function.mail]: SMTP server response: 550 Unable to relay in d:\webserver\ev eryone_web\quan lykhachhang\thu \thumail.php on line 16
An error occurred when sending the email to(E-Mail address blocked: See forum rules) from(E-Mail address blocked: See forum rules)
Thanks a lot
<head>
<title>Trang goi mail</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<?php
$to = "vytien123@yaho o.com";
$from = "vytien83@yahoo .com";
$subject = "This is a test email";
$message = "Dear Vy,\n\nThis is a fake email, I hope you enjoy it.\n\nFrom Tien.";
$headers = "From: $from\r\n";
$success = mail($to, $subject, $message, $headers);
if ($success)
echo "The email to $to from $from was successfully sent";
else
echo "An error occurred when sending the email to $to from $from";
?>
</body>
</html>
// this is result when I run this page
Warning: mail() [function.mail]: SMTP server response: 550 Unable to relay in d:\webserver\ev eryone_web\quan lykhachhang\thu \thumail.php on line 16
An error occurred when sending the email to(E-Mail address blocked: See forum rules) from(E-Mail address blocked: See forum rules)
Thanks a lot
Comment