Skip to content

Added support for arrays for smtp_user and smtp_pass config options#10083

Merged
alecpl merged 2 commits intoroundcube:masterfrom
jce-zz:master
Mar 29, 2026
Merged

Added support for arrays for smtp_user and smtp_pass config options#10083
alecpl merged 2 commits intoroundcube:masterfrom
jce-zz:master

Conversation

@jce-zz
Copy link
Copy Markdown
Contributor

@jce-zz jce-zz commented Feb 3, 2026

With Roundcube 1.6 the possibility was added to have more than one SMTP host, i.e. define an array of SMTP hosts, which get selected based on the IMAP host used for the logged in user. However, one could still only define a single smtp_user and smtp_pass or use the IMAP user and password (%u, %p) as credentials.

For many scenarios, this is not sufficient and therefore I added the same mechanism that is used to select the SMTP host based on the IMAP host to select the SMTP user and SMTP password both defined in arrays similar to SMTP host.

Copy link
Copy Markdown

@dianecloud dianecloud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

The initial PR broke the possibility to pass empty strings to the connect function for $user and $pass to effectively disable authentication. The updated PR now also allows this and only uses the configuration values of $user and $pass (including support for arrays) if they were not passed as parameters to the connect function - same as the original code did.
@jce-zz jce-zz requested a review from alecpl March 25, 2026 07:09
@alecpl alecpl merged commit c33291b into roundcube:master Mar 29, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants