Roundcube Community Forum

News and Announcements => General Discussion => Topic started by: andileni on December 16, 2020, 10:48:55 AM

Title: Multiple smtp out server
Post by: andileni on December 16, 2020, 10:48:55 AM
Hello,

I want to use roundcube to connect multiple mail servers at one place.
What I have is a working installation for two different imap servers, which works fine.
What I don't understand is how I can assign a smtp server for them?
It currently seems like they both use the same smtp server.
Can someone give me a hint?

Thanks and kind regards
Andreas
Title: Re: Multiple smtp out server
Post by: JohnDoh on December 17, 2020, 12:26:20 PM
Have a look at the comments for the smtp_server config option there are a few ways of doing it:
Code: [Select]
// SMTP server host (for sending mails).
// Enter hostname with prefix ssl:// to use Implicit TLS, or use
// prefix tls:// to use STARTTLS.
// 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
$config['smtp_server'] = 'localhost';
Title: Re: Multiple smtp out server
Post by: andileni on December 17, 2020, 12:43:45 PM
Thanks for the answer.
I was a little unprecise in my first post, I want to assign two different smtp servers for each of my accounts.
Is this possible?