On 2024-07-20 15:55, Marc wrote:
> ./config/defaults.inc.php
>
>   // SMTP server host (and optional port number) for sending mails.
>   // Enter hostname with prefix ssl:// to use Implicit TLS, or use
>   // prefix tls:// to use STARTTLS.
>   // If port number is omitted it will be set to 465 (for ssl://) or
> 587 otherwise.
>   // Supported replacement variables:
>   // %h - user's IMAP hostname
>   // %n - hostname ($_SERVER['SERVER_NAME'])
>   // %t - hostname without the first part
>   // %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first
> part)
>   // %z - IMAP domain (IMAP hostname without the first part)
>   // For example %n = mail.domain.tld, %t = domain.tld
>   // To specify different SMTP servers for different IMAP hosts provide
> an array
>   // of IMAP host (no prefix or port) and SMTP server e.g.
> ['imap.example.com' => 'smtp.example.net']
>   $config['smtp_host'] = 'localhost:587';
>
I'm not very good at php.
It looks like I've put the smtp server, user, password in
"/etc/roundcube/config.inc.php".
I need separate user and password for about 4 different smtp servers.
The way it is at the moment, with the one smtp server passing emails on,
complicates the email headers.
How would the array be structured for different smtp server, user,
password for each external domain?
mick


I have done it like this:

$sn = array("xxx", "xxx",);

if (in_array($_POST['_user'], $sn)) { rcube::write_log('errors', '>>>
yeah2'); $config['smtp_host'] = 'mail.xxxx.xxx'; $config['imap_host']
= 'mail.xxxx.xxx'; }


thanks.
I guess "array" is a PHP keyword and the "xxx", "xxx", are the 2 fields in the identities?
Is that then
$user1=array("xxx", "aaa",);
$user2=array("yyy", "bbb",);
$user3=array("zzz", "ccc",);
?
Is '>>> yeah2' just an identifier which one went wrong?

cheers
mick

_______________________________________________
Users mailing list -- users@lists.roundcube.net
To unsubscribe send an email to users-le...@lists.roundcube.net

Reply via email to