0
Help me please
In PHP, how can I use the mail function on a local server?
1 Resposta
+ 1
Mohammed Safras are you asking for the code itself...
<?php
$to = "my_friend_at@yandex.ru";
$subject = "This is a Test";
$message = "This is a test email sent from a local server.";
$headers = "From: my_email_at@yandex.com";
if (mail($to, $subject, $message, $headers)) {
echo "Email was successfully sent!";
} else {
echo "Email bounced, try again.";
}
?>