Note: This is the documentation for the outdated version 4 of MAMP & MAMP PRO. The documentation for the current version can be found under https://documentation.mamp.info.
The way we to transport emails over the internet is by using a Mail Transfer Agent (MTA) with its Simple Mail Transfer Protocol (SMTP). MAMP PRO uses Postfix as its MTA. Most of the email providers have a strong filter in their systems, which allows to pass only emails with some default headers. The following will help you send email using postfix. You will need to create 3 files, and one new subdirectory.
Add a new host in MAMP PRO, call it “hostmailer”.
Create an “email” subdirectory. Add an empty “InvatationEmail.php”, “invatationMessage.html” and “script.php” to your “email” subdirectory.
In the Postfix tab, check the box “Include Postfix service in GroupStart”.
Set “domain of outgoing emails” to: hostmailer.com .
Save and restart the servers.
Open the hostmailer page and add to the browser path input: hostmailer/email/script.php .
After a few minutes you should receive your email (check if it didn’t go to spam).
Copy and paste the following. This will be your “InvatationEmail.php” file.
Copy and paste the following. This will be your “invatationMessage.html” file.
Copy and paste the following. This will be your “script.php” file. Add the correct email address.
More detailed information about postfix can be found here.