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.

Comments

ch3nyong’s picture

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!!

oadaeh’s picture

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.

oadaeh’s picture

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.
ch3nyong’s picture

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

oadaeh’s picture

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.

ch3nyong’s picture

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.

oadaeh’s picture

Category: support » task

I need to add the information in comments 2 and 3 to the documentation.

oadaeh’s picture

Assigned: Unassigned » oadaeh

Assigning to self.

oadaeh’s picture

Version: 5.x-1.1 » 7.x-1.x-dev

Moving to a current branch.

oadaeh’s picture

Status: Active » Fixed

I've added the information in comments 2 and 3 to the README.txt.

For 6.x-1.x: http://drupalcode.org/project/basic_webmail.git/commit/8bd2ad4
For 7.x-1.x: http://drupalcode.org/project/basic_webmail.git/commit/a0c173f

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

vishal.sirsodiya’s picture

Issue summary: View changes

Hi
I have follow as setting as per the #3
But its not working Plz help me.

Error is :-
--------------------------------------------
SMTP -> FROM SERVER:

SMTP -> FROM SERVER:

SMTP -> ERROR: EHLO not accepted from server:

SMTP -> FROM SERVER:

SMTP -> ERROR: HELO not accepted from server:

SMTP -> NOTICE:
EOF caught while checking if connectedStartTLS not supported by server or could not initiate session.

oadaeh’s picture

@vishal.sirsodiya, based on the error you posted, it looks like TLS is not supported. Try selecting SSL instead.

vishal.sirsodiya’s picture

@oadaeh : Thankx :)