diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-07-03 13:02:48 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-07-03 13:02:48 +0000 |
| commit | 60caab2b0eb8b9d9bef3cb17331985fe1e45ebcb (patch) | |
| tree | 2bf4b5840c7bde0c10f22f8c08f0ef258b752243 /roundcubemail | |
| parent | 46ba6507f500376d8e82b0f1908e2f7410406708 (diff) | |
Add plugin hooks 'smtp_connect' and 'list_identities' (#1485954, #1485958)
git-svn-id: https://svn.roundcube.net/trunk@2702 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail')
| -rw-r--r-- | roundcubemail/program/include/rcube_smtp.inc | 13 | ||||
| -rw-r--r-- | roundcubemail/program/steps/settings/func.inc | 10 |
2 files changed, 18 insertions, 5 deletions
diff --git a/roundcubemail/program/include/rcube_smtp.inc b/roundcubemail/program/include/rcube_smtp.inc index ef84b031f..b5bd183d8 100644 --- a/roundcubemail/program/include/rcube_smtp.inc +++ b/roundcubemail/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; diff --git a/roundcubemail/program/steps/settings/func.inc b/roundcubemail/program/steps/settings/func.inc index 5fad317f3..ba98a2cec 100644 --- a/roundcubemail/program/steps/settings/func.inc +++ b/roundcubemail/program/steps/settings/func.inc @@ -408,17 +408,19 @@ function rcmail_user_prefs_block($part, $no_override, $attrib) function rcmail_identities_list($attrib) { - global $OUTPUT, $USER; + global $OUTPUT, $USER, $RCMAIL; // add id to message list table if not specified if (!strlen($attrib['id'])) $attrib['id'] = 'rcmIdentitiesList'; - // define list of cols to be displayed - $a_show_cols = array('name', 'email'); + // get all identites from DB and define list of cols to be displayed + $plugin = $RCMAIL->plugins->exec_hook('list_identities', array( + 'list' => $USER->list_identities(), + 'cols' => array('name', 'email'))); // create XHTML table - $out = rcube_table_output($attrib, $USER->list_identities(), $a_show_cols, 'identity_id'); + $out = rcube_table_output($attrib, $plugin['list'], $plugin['cols'], 'identity_id'); // set client env $OUTPUT->add_gui_object('identitieslist', $attrib['id']); |
