Using Google for RoundcubeBildschirmfoto vom 2015-05-31 20:49:54

For Roundcube, a famous open-source webmail program, a built-in-addressbook is used for contacts, e-mail-addresses and phone numbers. If you have also a Google-account, maybe with an Android phone, you would have to synchronize your contacts manually. The plugin google_contacts does not work anymore, perhaps due to changes in the Google API. A alternative is google_addressbook to sync your Google addresses in readonly mode with Roundcube.

The steps to install and use it:

  1. Download the plugin google_addressbook, extract the zip-file and copy the folder plugins\google_addressbook in the plugin folder of your roundcube installation.
  2. Create the database table using the SQL statements in the SQL directory. In my case for MYSQL: “CREATE TABLE `contacts_google` (
    `contact_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
    `changed` datetime NOT NULL DEFAULT ‘1000-01-01 00:00:00’,
    `del` tinyint(1) NOT NULL DEFAULT ‘0’,
    `name` varchar(128) NOT NULL DEFAULT ”,
    `email` text NOT NULL,
    `firstname` varchar(128) NOT NULL DEFAULT ”,
    `surname` varchar(128) NOT NULL DEFAULT ”,
    `vcard` longtext NULL,
    `words` text NULL,
    `user_id` int(10) UNSIGNED NOT NULL,
    PRIMARY KEY(`contact_id`),
    CONSTRAINT `user_id_fk_contacts_google` FOREIGN KEY (`user_id`)
    REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
    INDEX `user_contacts_google_index` (`user_id`,`del`)
    ) ;”
  3. You need Google APIs Client Library for PHP. Copy it into the vendor folder that it looks like “your_roundcube\vendor\google\apiclient\src\Google“. The libraries must be included in
    your PHP.ini
    if possible. When you have no access to your PHP.ini or get an error message of missing functions or similar, you have to autoload the API once at the beginning of google_func.php, after line 10:
    require_once(dirname(__FILE__) . ‘/../../vendor/google/apiclient/src/Google/autoload.php’);
  4. Activate the plugin in your configuration main.inc.php: $rcmail_config[‘plugins’] = array(google_addressbook);Bildschirmfoto vom 2015-06-25 00:09:45
  5. Log-in your roundcube webmailer, go to “Settings->Addressbook”, activate Google Addressbook and automatic syncronisation on Startup. Further you have to click on the link to get the Google Auth Code you have to insert.
  6. Your next lock-in will take a few seconds longer as Roundcube is syncing your contacts with Google.
Roundcube with Google Addressbook
Markiert in: