diff options
Diffstat (limited to 'phpBB/includes/functions_messenger.php')
| -rw-r--r-- | phpBB/includes/functions_messenger.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index 7296a8c283..f2ad76f892 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -45,9 +45,21 @@ class messenger */ function to($address, $realname = '') { + global $config; + $pos = isset($this->addresses['to']) ? sizeof($this->addresses['to']) : 0; + $this->addresses['to'][$pos]['email'] = trim($address); - $this->addresses['to'][$pos]['name'] = trim($realname); + + // If empty sendmail_path on windows, PHP changes the to line + if (!$config['smtp_delivery'] && strpos(strtolower(PHP_OS), 'win') === 0) + { + $this->addresses['to'][$pos]['name'] = ''; + } + else + { + $this->addresses['to'][$pos]['name'] = trim($realname); + } } /** |
