I'm using MAMP PRO 4.2 (9213)
on MacOS Sierra
with PHP 7.1.8
.
In the postfix section I filled my_domain.com
in domain name for outgoing messages
and I checked take postfix in GroupStart
.
Calling that short snippet (that works on another server) I'm getting no e-mail (test@example.com
is placeholder for my real own e-mail):
<?php
$to = "test@example.com";
$subject = "Test";
$mail = "Hello, this is a test!";
mail($to,$subject,$mail);
?>
What am I doing wrong? How can I make PHP mail() work?