PHPackages                             toteph42/identity\_switch - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. toteph42/identity\_switch

ActiveRoundcube-plugin[Mail &amp; Notifications](/categories/mail)

toteph42/identity\_switch
=========================

This plugin allows users to switch between different accounts (and check for new mails) in a single Roundcube session.

2.0.24(1mo ago)211.2k↑350%9[1 issues](https://github.com/toteph42/identity_switch/issues)GPL-3.0+PHPPHP &gt;=8.1

Since Mar 27Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/toteph42/identity_switch)[ Packagist](https://packagist.org/packages/toteph42/identity_switch)[ Docs](https://github.com/toteph42/identity_switch)[ RSS](/packages/toteph42-identity-switch/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (92)Used By (0)

identity switch plugin for Roundcube
====================================

[](#identity-switch-plugin-for-roundcube)

[![](https://camo.githubusercontent.com/0639726e7976de1b0876073aae8712afc409a661853f11099b29f87d08e2e615/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f7465706834322f6964656e746974795f7377697463682e737667)](https://camo.githubusercontent.com/0639726e7976de1b0876073aae8712afc409a661853f11099b29f87d08e2e615/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f7465706834322f6964656e746974795f7377697463682e737667)[![](https://camo.githubusercontent.com/1f6232a98887039c124d4b1bea7a241206917434f7e9c3238a838be7d641b1a6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f746f7465706834322f6964656e746974795f7377697463682e737667)](https://camo.githubusercontent.com/1f6232a98887039c124d4b1bea7a241206917434f7e9c3238a838be7d641b1a6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f746f7465706834322f6964656e746974795f7377697463682e737667)[![](https://camo.githubusercontent.com/0eca029e43680a92a0f406b4f689c505c42a21e097bf5c2c5883a3ab1007424b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746f7465706834322f6964656e746974795f7377697463682e737667)](https://camo.githubusercontent.com/0eca029e43680a92a0f406b4f689c505c42a21e097bf5c2c5883a3ab1007424b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746f7465706834322f6964656e746974795f7377697463682e737667)

This plugin is based on the [ident\_switch](https://github.com/dougluce/ident_switch "ident_switch") plugin. It is completly rewritten and additional features have been added.

This plugin allows users to switch between different accounts in a single Roundcube session like this:

[![Screenshot example](./assets/Pic01.png "Identity selection")](./assets/Pic01.png)

### Where to start

[](#where-to-start)

- In settings interface create new identity.
- For all identities except default you will see new section of settings - "Data of your identity" (see screenshot below). Enter data required to connect to remote server. Don't forget to check **Enabled** check box.
- After you have created at least one identity with active plugin you will see combobox in the top right corner instead of plain text field with account name. It will allows you to switch to another account.

### Settings

[](#settings)

[![Plugin settings](./assets/Pic02.png "Connection settings")](./assets/Pic02.png)

- **Enabled** - Enables plugin (i.e. account switching) for this identity.
- **Label** - Text that will be displayed in drop down list for this identity.
- **IMAP**
    - **Username** - User name used for IMAP servers.
    - **Password** - Password used for IMAP servers. It's stored encrypted in database.
    - **Server host name** - Host name for imap server. If left blank 'localhost' will be used.
    - **Encryption** - Connection security (None, SSL or TLS).
    - **Port** - Port on server to connect to. If left blank 143 will be used.
    - **Delimiter** - IMAP folder delimiter.
- **SMTP**
    - **Username** - User name used for SMTP servers. This should normally be the same value as used for IMAP server.
    - **Password** - Password used for SMTP servers. It's stored encrypted in database. This should normally be the same value as used for IMAP password.
    - **Server host name** - Host name for imap server. If left blank 'localhost' will be used.
    - **Encryption** - Connection security (None, SSL or TLS).
    - **Port** - Port on server to connect to. If left blank 25 will be used.

### Settings for active identity

[](#settings-for-active-identity)

[![Plugin settings](./assets/Pic04.png "New mail checking")](./assets/Pic04.png)

If you've selected an identity (or use the default identity), you may change settings for new-mail check cycle in `Settings` -&gt; `Preference` -&gt; `User Interface`.

[![Plugin settings](./assets/Pic05.png "Notification settings")](./assets/Pic05.png)

If you've selected an identity (or use the default identity), you may change settings for notification settings in `Settings` -&gt; `Preference` -&gt; `Mailbox view`.

### Additional settings

[](#additional-settings)

[![Plugin settings](./assets/Pic03.png "Notification settings")](./assets/Pic03.png)

- **Check all folders...** - Select this option, if you want all folders to be check for new mails.
- **Display browser notification...** - Select this option, if you want to get a changed icon for this site. Please be aware, that the icon will change only one time, even if there a new mails for multiple identities available (until next new-mail check-cycle is started).
- **Display desktop notification...** - Select this option, if you want to get a desktop notification about how many new mails were available. Please be aware, you need to allow your mail server site in your browser configuration to send notifications to your desktop.
- **Close desktop notification** - Specify how many seconds should be visible before it is automatically been closed.
- **Play sound...** - Select this option, if you want a sound notification. Please be aware, that only sound will be played one time only, even if there are new mails for multiple identities available (until next new-mail check cycle is started). If you hear no sound playing, please check your browser settings, if auto-play of sound files is enabled.
- **Refresh...** - Specify the new-mail check cycle in minutes.

[![Plugin settings](./assets/Pic06.png "E-Mail notification")](./assets/Pic06.png)

If you receive new mails, the number of new mails will be shown in identity selection menue.

### Configuration

[](#configuration)

There is a file `config.inc.php.dist` in the plugin directory available with mutiple configuration parameters. This file can be used to specify some configuration settings. Please copy file to `config.inc.php` and change there your settings.

If you want to change sound, icon or desktop icon, please checkout `alert.mp3`, `alert.ico` and `alert.gif` in sub-directory `assets`.

### Locking configuration

[](#locking-configuration)

You may use the `dont_override` configuration option in your **RoundCube** configuration file `config/config.inc.php` to lock some options from being overriden. This plugins supports the following options to be protected:

- `draft_mbox`, `sent_mbox`, `junk_mbox`, `trash_mbox` - User cannot override preconfigured special folder name.
- `check_all_folders` - User cannot override preconfigured flag to check all folders.
- `newmail_notifier_basic`, `newmail_notifier_desktop`, `newmail_notifier_sound` - User cannot override preconfigured notification setting.

### Performance

[](#performance)

New mail checking is performed in background asynchronously. This has the effect that the new mail counter is not always updated immediately after login - it may take some time before this has been performed. It heavily depends on the number of identities you're using.

If you've select **Check all folders**, this has a huge impact on the time new-mail checking need to collect information. If you have hundreds of folders in your mail box, each of the boxes will be check for new mails.

Please don't forget to set `Special Folders` in `Settings` -&gt; `Preferences`. All folders specified there (and their sub-folders) will be excluded from new-mail checking.

### Version compatibility

[](#version-compatibility)

- Versions 1.x / 2.x - for Roundcube v1.6.x requires PHP version &gt;= 8.0.0.

### Limitations

[](#limitations)

This plugin only supports `Classic`, `Elatic`, `Larry` and `Hivemail` skin. If you wan't to get another skin to be supoorted, then please contact me. I can add support for other skin if you buy for it.

### Migration from ident\_switch plugin

[](#migration-from-ident_switch-plugin)

If you've installed the `ident_switch` plugin, there is a migration file available in `SQL` subdirectory which copies the content of the old table to the new table and deletes the `ident_switch` table. To make this happen, you should first install this plugin (during installation a table `identity_switch` will automatically be created) and then you should appy `SQL/migrate.sql`.

### License

[](#license)

This plugin is released under the [GNU General Public License v3.0](./LICENSE).

### Debugging

[](#debugging)

If you encounter problems with plugin, take a look at the option available in `config.inc.php`.

If you encounter **connection problems**, it is a good idea to enable **RoundCube** available debugging options:

```
// Log IMAP conversation to /imap.log or to syslog
$config['imap_debug'] = true;
// Log sent messages to /sendmail.log or to syslog
$config['smtp_log'] = true;

// Log SMTP conversation to /smtp or to syslog
$config['smtp_debug'] = true;
```

Then switch to the identity which does not work as expected. In log files you'll see how **RoundCube** is trying to establish connection.

### Donation

[](#donation)

If you like this software and you want support my work, feel free to send me a donation:

[ ![Donate with PayPal](https://camo.githubusercontent.com/0145f4c212cf9f2b903c0ea3b8f27e952bde347eb91cf920353e02380d74e818/68747470733a2f2f7777772e70617970616c6f626a656374732e636f6d2f656e5f55532f444b2f692f62746e2f62746e5f646f6e61746543435f4c472e676966) ](https://www.paypal.com/donate/?hosted_button_id=DS6VK49NAFHEQ)

\[[List of changes](./Changes.md)\]

###  Health Score

54

—

FairBetter than 97% of packages

Maintenance89

Actively maintained with recent releases

Popularity30

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~8 days

Total

91

Last Release

52d ago

Major Versions

1.1.21 → 2.0.12025-10-07

PHP version history (2 changes)1.0.0PHP &gt;=8.0.0

2.0.16PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/c366be98e040cad90b26823f020359c540b474a34a111e8e9e579dec07ef4c18?d=identicon)[toteph42](/maintainers/toteph42)

---

Top Contributors

[![andreiapostu](https://avatars.githubusercontent.com/u/66628436?v=4)](https://github.com/andreiapostu "andreiapostu (5 commits)")[![toteph42](https://avatars.githubusercontent.com/u/2334583?v=4)](https://github.com/toteph42 "toteph42 (5 commits)")[![CodeShakingSheep](https://avatars.githubusercontent.com/u/19874562?v=4)](https://github.com/CodeShakingSheep "CodeShakingSheep (2 commits)")[![buttercookie42](https://avatars.githubusercontent.com/u/7611366?v=4)](https://github.com/buttercookie42 "buttercookie42 (1 commits)")[![n3storm](https://avatars.githubusercontent.com/u/220748?v=4)](https://github.com/n3storm "n3storm (1 commits)")

---

Tags

mailidentitysmtpswitchimapnew mail checknotify new mailselect identity

### Embed Badge

![Health badge](/badges/toteph42-identity-switch/health.svg)

```
[![Health](https://phpackages.com/badges/toteph42-identity-switch/health.svg)](https://phpackages.com/packages/toteph42-identity-switch)
```

###  Alternatives

[php-imap/php-imap

Manage mailboxes, filter/get/delete emails in PHP (supports IMAP/POP3/NNTP)

1.7k12.9M42](/packages/php-imap-php-imap)[ddeboer/imap

Object-oriented IMAP for PHP

9153.9M11](/packages/ddeboer-imap)[nette/mail

📧 Nette Mail: A handy library for creating and sending emails in PHP.

5389.8M246](/packages/nette-mail)[webklex/php-imap

PHP IMAP client

4365.5M14](/packages/webklex-php-imap)[jason-munro/cypht

Lightweight Open Source webmail written in PHP and JavaScript

1.5k146.0k](/packages/jason-munro-cypht)[directorytree/imapengine

A fully-featured IMAP library -- without the PHP extension

531175.4k4](/packages/directorytree-imapengine)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
