diff options
Diffstat (limited to 'includes/functions/functions_mail.php')
| -rw-r--r-- | includes/functions/functions_mail.php | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/includes/functions/functions_mail.php b/includes/functions/functions_mail.php index ac4717d5b2..b92d64e7b8 100644 --- a/includes/functions/functions_mail.php +++ b/includes/functions/functions_mail.php @@ -139,14 +139,12 @@ function webtreesMail($to, $from, $subject, $message) { $mail_object->SMTPSecure = 'tls'; } $from_name = ''; - if (!get_site_setting('SMTP_SIMPLE_MAIL')) { - preg_match('/<(.*)>/', $to, $matches); - if (isset($matches[1])) $to = $matches[1]; - preg_match('/<(.*)>/', $from, $matches); - if (isset($matches[1])) { - if (($pos = strpos($from, '<')) !== false) $from_name = substr($from, 0, $pos); - $from = $matches[1]; - } + preg_match('/<(.*)>/', $to, $matches); + if (isset($matches[1])) $to = $matches[1]; + preg_match('/<(.*)>/', $from, $matches); + if (isset($matches[1])) { + if (($pos = strpos($from, '<')) !== false) $from_name = substr($from, 0, $pos); + $from = $matches[1]; } $mail_object->SetFrom($from, $from_name); if ((!empty($SMTP_FROM_NAME) && $from!=$SMTP_AUTH_USER) || !empty($from_name)) { |
