Set up Mailhandler with IMAP Gmail I can't figure out how to configure Mailhandler with an IMAP Gmail account locally with MAMP.

I've been following the recommendation at http://drupal.org/node/207366#gmail and it is never working fine. The test mbox that ships with the module works just fine.

My settings are:


Protocol: IMAP
Folder: INBOX
Domain: imap.gmail.com
Port: 993
Username: username@gmail.com
Password: mypassword
Extra commands: /ssl


I've tested different combinations like:


Switch imap.gmail.com to gmail-imap.l.google.com
Changed port to 995 or 587
Trimmed username to "username" only (w/o @gmail.com)
Switched /ssl by /ssl/novalidate-cert, /tls, /notls...


Most of these attempts were without any conviction and only because the default config wouldn't work and return the following error when saving:

Warning: imap_open() [function.imap-open]: Couldn't open stream {imap.gmail.com:993/ssl/novalidate-cert}INBOX in MailhandlerPhpImapRetrieve-&gt;open_mailbox() (line 118 of /docroot/sites/all/modules/mailhandler/modules/mailhandler_php_imap/plugins/mailhandler/retrieve/MailhandlerPhpImapRetrieve.class.php).


And this error when hitting "Test connection":

Mailhandler could not access the mailbox using these settings


Any idea what I'm missing to make this work ok?

P.S. : I can ping imap.gmail.com or telnet on port 993 just fine.
Unfortunately, MAMP (even the Pro version) basically provides no support for G-mail.  For evidence, look at the comments on the official guide on the MAMP blog.

Although I haven't tried it, one of the comments suggests this solution.

And here's another way to set up postfix on Lion without relying on MAMP.

I too use MAMP, and instead of working with mailhandler I use the SMTP module instead, which allows Drupal to send messages locally independent of the local mail configuration.