I am working in PHP and I have mamp on my machine. I would like to send emails from my PHP code, like this:
<?php
$to = "
[email protected]";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body)) {
echo("<p>Message successfully sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
?>
How can I configure a mail server for free on my machine?