summaryrefslogtreecommitdiff
path: root/program/include/rcube_smtp.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-07-07 08:36:42 +0000
committeralecpl <alec@alec.pl>2009-07-07 08:36:42 +0000
commit72cd3c1a761fad73235cad32f240a114ba2941aa (patch)
tree9220255bf80d1181e72bbcfe57d37971af4a8ac1 /program/include/rcube_smtp.inc
parent16036b9c862f298927454235ce79b131df3f25bf (diff)
- Support %h variable in 'smtp_server' option (#1485766)
Diffstat (limited to 'program/include/rcube_smtp.inc')
-rw-r--r--program/include/rcube_smtp.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/program/include/rcube_smtp.inc b/program/include/rcube_smtp.inc
index 066e5ed47..db681af05 100644
--- a/program/include/rcube_smtp.inc
+++ b/program/include/rcube_smtp.inc
@@ -64,10 +64,10 @@ function smtp_mail($from, $recipients, &$headers, &$body, &$response, &$error)
));
$smtp_timeout = null;
- $smtp_host = $CONFIG['smtp_server'];
+ $smtp_host = str_replace('%h', $_SESSION['imap_host'], $CONFIG['smtp_server']);
$smtp_port = is_numeric($CONFIG['smtp_port']) ? $CONFIG['smtp_port'] : 25;
- $smtp_host_url = parse_url($CONFIG['smtp_server']);
-
+ $smtp_host_url = parse_url($smtp_host);
+
// overwrite port
if (isset($smtp_host_url['host']) && isset($smtp_host_url['port']))
{