interactive. media. development.

Solved:Enabling sendmail on localhost for MAMP free version

Enabling the sendmail function on localhost to send and receive emails has turned out to be a project so I decided to figure out the solution and share it with everyone else.

In free version MAMP mail function is not enabled by default and you have to enable it yourself. At, first when I tried out MAMP on my localhost I found out about this when one of the application was not sending out the mail. So, I did some research but was not able to find much of anything however after digging and info gathering around the web and forums I finally found the solution.

Note that MAMP forums suggest to enable Postfix but for some odd reason I wasn't able to get Postfix working with my domain's email settings which is on gmail(google apps).


First thing you have to do is locate php.ini which is located below:

cd /Applications/MAMP/conf/php5.3/php.ini

Next, you will need to open up your php.ini file and find "[mail function]" you should do the following:

Existing MAMP default configuration:
I'm not really sure why MAMP's default [mail function] settings have the Win32 options enabled and the unix path not turned on:

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
;sendmail_from =

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =

Change it to this: (you can copy and paste the following code)

[mail function]
; For Win32 only.
;SMTP = localhost
;smtp_port = 25

; For Win32 only.
;sendmail_from =

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
sendmail_path =/usr/sbin/sendmail -t -i -f

Make sure you change your email from to your own email.

The "sendmail_path =/usr/sbin/sendmail -t -i -f" I found this in a forum thread, but figured I would put a little bit more detail into what I discovered so that its easy for people to understand. I've done this testing all in my localhost development it has been very helpful e-mailing me when I test out new applications. This worked for but its not guaranteed that it can work for anyone as it depends on your MAMP and OS version, Hope this helps.

© Copyright Triple ROI
165 Tremont St Boston, MA 02111 - Suite 3

Wordpress Design Services | Boston Website Programmer | Modern Website Design | Shopping Cart Boston | Start an Online Store
Terms of Use | Privacy Policy