From badc70661dc77a15f3b28f0d860d12ee6fd7bde3 Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Tue, 23 Nov 2010 16:02:56 +0000 Subject: Use ULTRAHOSTNAME or hostname command to find domain name for check_email() --- it_mail.class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'it_mail.class') diff --git a/it_mail.class b/it_mail.class index ea31015..b0e20c7 100644 --- a/it_mail.class +++ b/it_mail.class @@ -408,7 +408,7 @@ function check_email($email, $checkmailbox = true) asort($mx, SORT_NUMERIC); $port = getservbyname('smtp', 'tcp'); - $from = 'itools@gna.ch'; + $from = "itools@" . (($domain = it::match('[^.]*\.(.+)', getenv('ULTRAHOSTNAME') ? getenv('ULTRAHOSTNAME') : it::exec('hostname -f 2>/dev/null || hostname 2>/dev/null'))) ? $domain : "gna.ch"); /* Determine domain and email for test, skip if called as it_mail::check_email() */ if (is_object($this)) -- cgit v1.2.3