Gmail IMAP Setting?

ch3nyong - June 3, 2008 - 11:18
Project:Basic webmail
Version:5.x-1.1
Component:Documentation
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi guys, I thought having webmail in Drupal is way so cool!

However, I'm having problem setting up with my Gmail account :s

I'm using the following config settings:

  • Server address: imap.gmail.com
  • Connection port: 993

With all the below checked:

  • Secure login.
  • Encrypt session using SSL.
  • Validate certificate.
  • Encrypt session using TLS.

#1

ch3nyong - June 3, 2008 - 11:20

Ops, I missed out my request...

So, anyone can tell me what's wrong with my setting?

I'm getting error as follow:

warning: imap_open() [function.imap-open]: Couldn't open stream {imap.gmail.com:993/secure/ssl/validate-cert/tls}INBOX in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\drupal57\modules\basic_webmail\basic_webmail.module on line 1960.

Any help is much appreciated! Please, Thanks!!

#2

oadaeh - June 3, 2008 - 13:26

Here's what works for me:

  • In Administer -> Site configuration -> Basic webmail (admin/settings/basic_webmail), set the following:
    • In General settings:
      • Leave Use the user's account e-mail address and password for checking e-mail. unchecked
      • The other settings are personal preference and can be set to what ever you wish.
    • In Server settings:
      • Set Server address to imap.gmail.com.
      • Set Connection port to 993.
      • Check Encrypt session using SSL.
      • Uncheck all the others.
    • Save the settings.
  • In My account -> Edit, set the following:
    • In Basic webmail account settings:
      • Put your GMail e-mail address in E-mail account login, including the @gmail.com part.
      • Put your GMail password in Password and Confirm password.
    • Save the settings.

Also, if you use the SMTP Authentication Support module, and set it up to use GMail settings, your outgoing mail will be saved in the Sent folder.

#3

oadaeh - June 3, 2008 - 13:53

Here are the settings for the SMTP Authentication Support module:

  • In Administer -> Site configuration -> Basic webmail (admin/settings/basic_webmail), set the following:
    • In Install options, set the following:
      • Check the On radio button.
    • In SMTP server settings, set the following:
      • In SMTP Server, put smtp.gmail.com.
      • You can leave SMTP Backup Server blank, or put in the name of some other SMTP server, but it will have to use the same settings for the following two options.
      • In SMTP port, put 465.
      • Set Use encrypted protocol to Use TLS.
    • In SMTP Authentication, set the following:
      • In Username, put your GMail e-mail address, including the @gmail.com part.
      • In Password, put your GMail password.
    • In E-mail options, set the following:
      • These settings are optional, and will change who the e-mails are From.

#4

ch3nyong - June 4, 2008 - 02:59

Thanks oadaeh for your response! The configuration seems working!

However, I wonder why does it take so long that it does not response even after 10mins... :(

Fatal error: Maximum execution time of 300 seconds exceeded in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\drupal\modules\basic_webmail\basic_webmail.module on line 2474

#5

oadaeh - June 4, 2008 - 20:33

Interesting. You received an error while retrieving an error message from the IMAP server. Based on the line it's complaining about (2474), the IMAP server is not responding to a imap_last_error() function call. At the very least, it should be responding after 5 minutes. I don't know why it's doing that.

#6

ch3nyong - June 6, 2008 - 01:52

Thanks oadaeh, you've been so helpful, appreciate that!

I've tried debugging and see what's wrong with my webmail setup to gmail.

It seems that imap_last_error() returns nothing when imap_fetchstructure() fails, and the loop keeps on and on. Will it because of my large number of mails that causes the (actual) timeout? I doubt.

Still debugging, while handling tons of other tasks.

 
 

Drupal is a registered trademark of Dries Buytaert.