[RCU] Useful feature: show Organization in identities when composing.

Kaz Kylheku 937-737-6257 at kylheku.com
Wed Mar 9 21:25:28 CET 2022

I have some twenty different sending identities for different purposes 
(mostly mailing lists). I use the same display name, but the e-mail 
address is different.

In the identities, I use the Organization field as a comment as to what 
the identity is for.

Because the display name is the same, it is hard to select the correct 
identity in the RoundCube UI.

With the patch, the organization is shown in the list box.

Screenshot first:


See how in the From, (Roundcube Mailing List) is shown in parentheses? 
Without that, I have no idea that 937-737-6257 is the correct identity.

In the past I worked around this by including some note in the display 
name, but that then goes into the e-mail as part of the From header.

The patch could be better: if the organization is empty, it could avoid 
affixing it. It's kind of a proof of concept.

Patch (Debian 11 installation of RC):

diff --git a/usr/share/roundcube/program/include/rcmail_sendmail.php 
index 180b4d0..88fee63 100644
--- a/usr/share/roundcube/program/include/rcmail_sendmail.php
+++ b/usr/share/roundcube/program/include/rcmail_sendmail.php
@@ -917,7 +917,8 @@ class rcmail_sendmail
// create SELECT element
foreach ($this->options['message']->identities as $sql_arr) {
$identity_id = $sql_arr['identity_id'];
- $select_from->add(format_email_recipient($sql_arr['email'], 
$sql_arr['name']), $identity_id);
+ $select_from->add(format_email_recipient($sql_arr['email'],
+ $sql_arr['name']) . ' (' . $sql_arr['organization'] . ')', 

// add signature to array
if (!empty($sql_arr['signature']) && 
empty($this->data['param']['nosig'])) {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.roundcube.net/pipermail/users/attachments/20220309/949a5b6b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: a4fe8b1b.png
Type: image/png
Size: 12211 bytes
Desc: not available
URL: <http://lists.roundcube.net/pipermail/users/attachments/20220309/949a5b6b/attachment.png>

More information about the users mailing list