Disable PHP's mail function
During local development you usually do not want PHP to actually send emails. Disabling the mail() function prevents accidental outgoing mail from your local sites.
-
Open MAMP PRO.
-
Go to File › Open Template › PHP (php.ini) › [PHP version].
-
Add the following line inside the
[PHP]section:disable_functions = "mail" -
Save and close the file.
-
Restart the servers.
Calls to mail() will now silently fail instead of attempting to send email.