IMAP SSL with MAMP

OK…super nerd warning on this post….

I am currently attempting to use PHP as a gateway for retrieving my IMAP mail for my Speak to Me/Breathe project, and I hit a MAJOR snag last night. It seems that the version of PHP 5 that currently comes with MAMP is totally not compiled with support for IMAP SSL (secure email connection). I think this is one of the key differences between MAMP and MAMP Pro which costs $70. This is a major bummer for anyone who wants to grab gMail, since they basically require that you use a SSL connection. After about 4 hours of wrestling with my file structure and recompiling both PHP 5 and the IMAP extension about 20 times, I finally figured out how to create a version of the IMAP extension through Terminal (something I’ve never done…). Since I went through all this pain and suffering, I figured I’d share it with everyone so that they don’t have to.

Basically all you need to do is download the attached “imap.so” file and drop it into the following directory:
Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20050922

Thats all there is to it. If you’d rather figure this out on your own I recommend reading the following instruction site, but keep in mind that I had to do a couple different things to get this to work, namely manually creating the “/usr/local/include/” directory in my local Apache PHP directory. You then need to follow comment #5 and copy the compiled files from the OS X Apache directory into MAMPs php extension directory (the one I mentioned above).

Thats all…hope someone can find this useful and avoid the pain I had to go through….

Click Here to Download IMAP SSL extension



Tags:
This entry was posted on Saturday, March 14th, 2009 at 8:06 am and is filed under Classes, Computation, General. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

18 Responses to “IMAP SSL with MAMP”

  1. Anonymous

    My mistake. The download link works fine when clicked from the main blog. It doesn’t link to the correct file when viewing the individual entry, however.

  2. Arthur

    Thanks, this is exactly what I was looking for- thanks for saving me the time to compile it myself. FYI the link on this page isn’t right- perhaps it’s relative?

  3. Steve

    Crap! Thanks i’ll change it to a direct link! Glad you enjoyed it, please spread it around, such a brutal process making that thing

  4. drupal newbies

    THANKS….. you have saved our new drupal team so much pain, time and $$$ wishing you all the best and great success with your project/s

  5. Steve

    No Problem, glad it was helpful!

  6. Spud

    Thanks mate, you saved my bacon

  7. Gleb

    Thanks a lot! Very helpful.

  8. Arab

    Thanks a lot. It drove me crazy unit I figured out it was because of MAMP library from your your post.

  9. Dmitri Gaskin

    Worked like a charm! THANKS!

  10. JoEyInBoX

    Works great! Thank’s :p

  11. alle

    Great! Thanks.

  12. eek

    Lifesaver!!

    Thanks a bunch.

    Works with current MAMP version (as of Sep 30, 2010) as well.

  13. deardooley

    Great patch, thanks a ton! You should have a “buy me a beer” link on your site for this one!

  14. chernkuan

    Hey! I have tried to put into my PHP 5.3 extensions folder. However, I am still unable to load the gmail. In my phpinfo(), it does not show that –imap-ssl is being enabled.

    May I know where can I get the steps to do so? I am on the latest MAMP 1.9.1
    Thanks :)

  15. Christophe Deliens

    This works like a charm!

    It’s sad that MAMP Pro has not this feature enabled by default!!!

  16. Tamas

    Hej,
    i put it in the /Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626/
    but simple not working with php 5.3.1, osx 10.6.4
    no errorlog at apache, simple not user like an extension..
    i spent over 10 hours now, try to recompile, imap, php, etc…nothing works.
    ive got an so what works its 2.8mb, but ssl is not work with it
    HELP :)

  17. Tamas

    ok its an xampp but has to work with it too..
    am i right?

  18. Steve

    Hi Tamas,

    I’m honestly unsure about anything outside of MAMP…I haven’t had any reason to use this in a while so it is as is. I know it works with MAMP but outside of that I’m not sure. If you do figure it out please let me know and I’ll add the info to the post.

Leave a Reply

Your comment