summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2009-07-03 13:02:48 +0000
committerthomascube <thomas@roundcube.net>2009-07-03 13:02:48 +0000
commit3ca3bd467ab9c5306de4a30c52f737e92eb39a9c (patch)
tree63cf0cab5a06b5d69daaa4b4514a34d54555a966 /program/include
parentfccdf16364bec9a15d9f44e0197f1653b0109c91 (diff)
Add plugin hooks 'smtp_connect' and 'list_identities' (#1485954, #1485958)
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcube_smtp.inc13
1 files changed, 12 insertions, 1 deletions
diff --git a/program/include/rcube_smtp.inc b/program/include/rcube_smtp.inc
index ef84b031f..b5bd183d8 100644
--- a/program/include/rcube_smtp.inc
+++ b/program/include/rcube_smtp.inc
@@ -51,7 +51,18 @@ $SMTP_CONN = null;
*/
function smtp_mail($from, $recipients, &$headers, &$body, &$response)
{
- global $SMTP_CONN, $CONFIG, $RCMAIL;
+ global $SMTP_CONN, $RCMAIL;
+
+ // let plugins alter smtp connection config
+ $CONFIG = $RCMAIL->plugins->exec_hook('smtp_connect', array(
+ 'smtp_server' => $RCMAIL->config->get('smtp_server'),
+ 'smtp_port' => $RCMAIL->config->get('smtp_port', 25),
+ 'smtp_user' => $RCMAIL->config->get('smtp_user'),
+ 'smtp_pass' => $RCMAIL->config->get('smtp_pass'),
+ 'smtp_auth_type' => $RCMAIL->config->get('smtp_auth_type'),
+ 'smtp_helo_host' => $RCMAIL->config->get('smtp_helo_host'),
+ ));
+
$smtp_timeout = null;
$smtp_host = $CONFIG['smtp_server'];
$smtp_port = is_numeric($CONFIG['smtp_port']) ? $CONFIG['smtp_port'] : 25;