RSS
 

PHP: Gmail with RoundCube

12 Aug

Some times I have problem accessing Gmail because of some Firewall restrictions. Or I would like to have my own WebMail client for my mail service hosted with Google Apps. I tried several setting and I found out that it is not that difficult just you have to know the right parameters.

Here are the parameters that worked for me:
In your main.inc.php try to modify these setting:

// IMAP settings
$rcmail_config['default_host'] = 'ssl://imap.gmail.com:993';
$rcmail_config['default_port'] = 993;
$rcmail_config['imap_auth_type'] = null;

$rcmail_config['username_domain'] = 'gmail.com';
$rcmail_config['mail_domain'] = 'gmail.com';

//SMTP settings
$rcmail_config['smtp_server'] = 'ssl://smtp.gmail.com';
$rcmail_config['smtp_port'] = 465;
$rcmail_config['smtp_user'] = '%u';
$rcmail_config['smtp_pass'] = '%p';

//MBox settings
$rcmail_config['drafts_mbox'] = '[Gmail]/Drafts';
$rcmail_config['junk_mbox'] = '[Gmail]/Spam';
$rcmail_config['sent_mbox'] = '';
$rcmail_config['trash_mbox'] = '';
$rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent', 'Junk', 'Trash');

[ad#AdBrite inline]

If you want to try. I made this setting on my sub domain mygmail.kristou.com. It is a RoudCube with the above settings.

 
2 Comments

Posted in PHP

 

Leave a Reply

 

 
  1. dimagromovfoto

    August 16, 2009 at 6:47 pm

    Thanks for writing, I very much liked your newest post. I think you should post more frequently, you evidently have natural ability for blogging!

     
  2. Kristou Mehrez

    August 17, 2009 at 5:38 pm

    Thank you very much. As soon as I get some idea, I will post it.
    If you have any thing you need to know more about it I can share my experience also.
    So feel free to ask me.