summaryrefslogtreecommitdiff
path: root/it_mail.class
diff options
context:
space:
mode:
authorChristian Schneider2010-11-23 16:02:56 +0000
committerChristian Schneider2010-11-23 16:02:56 +0000
commitbadc70661dc77a15f3b28f0d860d12ee6fd7bde3 (patch)
treec5d317d4a8c879484faee911f5504affa8782d41 /it_mail.class
parentd6aa1fbd0888ae6533e392f6f63da38e8639cb98 (diff)
downloaditools-badc70661dc77a15f3b28f0d860d12ee6fd7bde3.tar.gz
itools-badc70661dc77a15f3b28f0d860d12ee6fd7bde3.tar.bz2
itools-badc70661dc77a15f3b28f0d860d12ee6fd7bde3.zip
Use ULTRAHOSTNAME or hostname command to find domain name for check_email()
Diffstat (limited to 'it_mail.class')
-rw-r--r--it_mail.class2
1 files changed, 1 insertions, 1 deletions
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))