summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2006-09-01 13:53:23 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2006-09-01 13:53:23 +0000
commit3940f9d748f8270135c33a736820bf8ac6d8da35 (patch)
treefee6f06bb8a19fdff7f373e0f18b895438d83eec /roundcubemail/program/include
parentb9ce8aabca52046f1f5726a3506a7091c7fa073a (diff)
Correct creation of a message-id
git-svn-id: https://svn.roundcube.net/trunk@332 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
-rw-r--r--roundcubemail/program/include/main.inc27
1 files changed, 19 insertions, 8 deletions
diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc
index ecf53b52d..921494829 100644
--- a/roundcubemail/program/include/main.inc
+++ b/roundcubemail/program/include/main.inc
@@ -519,14 +519,7 @@ function rcmail_create_user($user, $host)
if ($user_id = $DB->insert_id(get_sequence_name('users')))
{
- $mail_domain = $host;
- if (is_array($CONFIG['mail_domain']))
- {
- if (isset($CONFIG['mail_domain'][$host]))
- $mail_domain = $CONFIG['mail_domain'][$host];
- }
- else if (!empty($CONFIG['mail_domain']))
- $mail_domain = $CONFIG['mail_domain'];
+ $mail_domain = rcmail_mail_domain($host);
if ($user_email=='')
$user_email = strstr($user, '@') ? $user : sprintf('%s@%s', $user, $mail_domain);
@@ -1646,6 +1639,24 @@ function rcmail_current_username($attrib)
}
+// return the mail domain configured for the given host
+function rcmail_mail_domain($host)
+ {
+ global $CONFIG;
+
+ $domain = $host;
+ if (is_array($CONFIG['mail_domain']))
+ {
+ if (isset($CONFIG['mail_domain'][$host]))
+ $domain = $CONFIG['mail_domain'][$host];
+ }
+ else if (!empty($CONFIG['mail_domain']))
+ $domain = $CONFIG['mail_domain'];
+
+ return $domain;
+ }
+
+
// return code for the webmail login form
function rcmail_login_form($attrib)
{