diff options
-rw-r--r-- | inc/mail.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/inc/mail.php b/inc/mail.php index 604a0999a..e1f327cfe 100644 --- a/inc/mail.php +++ b/inc/mail.php @@ -44,7 +44,9 @@ function mail_setup(){ if(!empty($USERINFO['mail'])){ $replace['@MAIL@'] = $USERINFO['mail']; }else{ - $replace['@MAIL@'] = 'noreply@'.parse_url(DOKU_URL,PHP_URL_HOST); + $host = @parse_url(DOKU_URL,PHP_URL_HOST); + if(!$host) $host = 'example.com'; + $replace['@MAIL@'] = 'noreply@'.$host; } if(!empty($_SERVER['REMOTE_USER'])){ |