diff options
author | Christian Schneider | 2010-11-23 16:02:56 +0000 |
---|---|---|
committer | Christian Schneider | 2010-11-23 16:02:56 +0000 |
commit | badc70661dc77a15f3b28f0d860d12ee6fd7bde3 (patch) | |
tree | c5d317d4a8c879484faee911f5504affa8782d41 /it_mail.class | |
parent | d6aa1fbd0888ae6533e392f6f63da38e8639cb98 (diff) | |
download | itools-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.class | 2 |
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)) |