After some relentless searching I found a great plugin that supports multiple IMAP accounts for Roundcube tucked away on BitBucket. It’s a great tool that simply adds a drop down of the IMAP accounts you’ve set-up to the top right area of Roundcube, replacing your email address in that area.
Update June 2019: You don’t need to follow the steps to replace any code as the author as since fixed the issue. Simply go here, download, and upload it to the plugins folder. 😍
Instructions on how to install multiple IMAP accounts plugin for Roundcube
- First, head over to here and click the ‘Download repository’ link
- Download it, and rename the folder to ident_switch
- Upload it to the /path/to/roundube/plugins/ folder
- Use the contents (for MySQL) of /path/to/roundcube/plugins/ident_switch/SQL/mysql.initial.sql and add it to your Rondcube database (you can do this by using phpMyAdmin). It will create a new database table named ident_switch
- As the script has not been updated for a while, it does not work for version 1.3. I created a fix, so make sure you head over here (or scroll to the bottom of this page for the code) and copy/paste the Javascript code (overwriting the entire file) into the file /path/to/roundcube/plugins/ident_switch/ident_switch.min.js
- Now you’re ready Logout and Login to Roundcube.
- Once you’re logged in navigate to Settings -> Identities and once you add a new Identity you’ll see a new section to add the IMAP details. Fill the fields in, add the identity and you’ll see the new drop-down menu at the top.
Screenshot
Updated code for ident_switch.min.js
$(function(){var $truName=$('.topright .username');if($truName){$sw=$('#plugin-ident_switch-account');if($sw){$sw.prependTo('#topline .topright');$truName.hide();$('#plugin-ident_switch-account:first-child').show();}} $("INPUT[name='_ident_switch.form.enabled']").change();$("SELECT[name='_ident_switch.form.secure']").change();plugin_switchIdent_processPreconfig();});function plugin_switchIdent_processPreconfig(){var disFld=$("INPUT[name='_ident_switch.form.readonly']");disFld.parentsUntil("TABLE","TR").hide();var disVal=disFld.val();if(disVal>0){$("INPUT[name='_ident_switch.form.host']").prop("disabled",true);$("SELECT[name='_ident_switch.form.secure']").prop("disabled",true);$("INPUT[name='_ident_switch.form.port']").prop("disabled",true);} if(2==disVal){$("INPUT[name='_ident_switch.form.username']").prop("disabled",true);}} function plugin_switchIdent_enabled_onChange(e){var $enFld=$("INPUT[name='_ident_switch.form.enabled']");$("INPUT[name!='_ident_switch.form.enabled'], SELECT",$enFld.parents("FIELDSET")).prop("disabled",!$enFld.is(":checked"));plugin_switchIdent_processPreconfig();} function plugin_switchIdent_secure_onChange(e){var $secSel=$("SELECT[name='_ident_switch.form.secure']");var $portFld=$("INPUT[name='_ident_switch.form.port']");if('SSL'===$secSel.val().toUpperCase()) $portFld.attr("placeholder",993);else $portFld.attr("placeholder",143);} function plugin_switchIdent_switch(val){rcmail.http_post('plugin.ident_switch.switch',{'_ident-id':val,'_mbox':rcmail.env.mailbox});} function plugin_switchIdent_fixIdent(iid){if(parseInt(iid)>0) $("#_from").val(iid);}
Hello!
Just installed this plugin – thanks for the pointers!
Everything seems OK except that after adding new identity and marking it as “enabled” under the Iden_Switch dialog, I do not get the dropdown box to select the identify, I can only see the primary identity under which I have logged on.
I checked the SQL table and the row is added into the ident_switch table.
Hello Steven,
I followed all the steps described but I still have the error [ident_switch.form.readonly].
Could you help me find a solution?
Thanks
You can ignore it. If you want to disable it, in either config.php or config.inc.php.dist change:
‘readonly’ => true
to
‘readonly’ => false
This will disable the fields from being read only.
Hello SSULLIVAN88,
I try this, but no solve the problem, the IMAP form not write in database.
You might want to check the error log as that should help you understand why it’s not saving to the database. You don’t have the config file setup do you?
Get Outlook for iOS