Servers and Services > Postfix

Sometimes you may need to send an email using PHP, to do so you have to configure and start Postfix. An easy way getting Postfix to run is using the configuration tool built into MAMP PRO.

MAMP

  • Include Postfix service in GroupStart

    Check to include Postfix in the GroupStart. When activated Postfix will automatically start/stop when the Servers button is pressed.


  • Set domain of outgoing e-mails to

    If you want to use the PHP function mail() for sending emails to your own email address (like [email protected]) you just need to add the value “johndoe.com” (without quotes and the according domain name) into this field.


  • Use a smart host for routing

    • Server name
      Fill in your server name for outgoing emails. This could be for instance “smtp.johndoe.com” (without quotes). Ask your provider if you are unsure about the server name.

    • Authentication
      Unencrypted: Your username and password will be sent unencrypted.

      MD5 Challenge-Response: MD5 Challenge Response Authentication will be used.

    • User name
      Add the user name of your mail account.

    • Password
      Add the password for your email user account.

MAMP PRO will move your existing main.cf and master.cf files to /private/etc/postfix/MAMP_backup when you include Postfix using the Groupstart in MAMP PRO. When you stop uncheck Groupstart your original postfix files will be moved back to /private/etc/postfix.