diff options
| author | Marc Alexander <admin@m-a-styles.de> | 2017-12-11 21:56:21 +0100 |
|---|---|---|
| committer | Marc Alexander <admin@m-a-styles.de> | 2017-12-11 21:56:21 +0100 |
| commit | 9f055e1af39f36ff18cc278093000cb30c858885 (patch) | |
| tree | 0dbfa5caa2e26c2c71936d84639b23722a14c8db /phpBB/includes/functions_messenger.php | |
| parent | b4ca1bdb0050b238797431f29faaefdc3057b50a (diff) | |
| download | forums-9f055e1af39f36ff18cc278093000cb30c858885.tar forums-9f055e1af39f36ff18cc278093000cb30c858885.tar.gz forums-9f055e1af39f36ff18cc278093000cb30c858885.tar.bz2 forums-9f055e1af39f36ff18cc278093000cb30c858885.tar.xz forums-9f055e1af39f36ff18cc278093000cb30c858885.zip | |
[ticket/15322] Add config setting for -f parameter & remove mail function name
The -f parameter can now be added via configuration in the ACP. Addtionally,
the config setting for the mail function name has been removed.
PHPBB3-15322
Diffstat (limited to 'phpBB/includes/functions_messenger.php')
| -rw-r--r-- | phpBB/includes/functions_messenger.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index dccad1c05c..2447a7d9cf 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -416,7 +416,7 @@ class messenger switch ($type) { case 'EMAIL': - $message = '<strong>EMAIL/' . (($config['smtp_delivery']) ? 'SMTP' : 'PHP/' . $config['email_function_name'] . '()') . '</strong>'; + $message = '<strong>EMAIL/' . (($config['smtp_delivery']) ? 'SMTP' : 'PHP/mail()') . '</strong>'; break; default: @@ -1839,7 +1839,8 @@ function phpbb_mail($to, $subject, $msg, $headers, $eol, &$err_msg) // On some PHP Versions mail() *may* fail if there are newlines within the subject. // Newlines are used as a delimiter for lines in mail_encode() according to RFC 2045 section 6.8. // Because PHP can't decide what is wanted we revert back to the non-RFC-compliant way of separating by one space (Use '' as parameter to mail_encode() results in SPACE used) - $result = $config['email_function_name']($to, mail_encode($subject, ''), wordwrap(utf8_wordwrap($msg), 997, "\n", true), $headers, "-f" . $config['board_email']); + $additional_parameters = $config['email_envelope_sender'] ? '-f' . $config['board_email'] : ''; + $result = mail($to, mail_encode($subject, ''), wordwrap(utf8_wordwrap($msg), 997, "\n", true), $headers, $additional_parameters); $collector->uninstall(); $err_msg = $collector->format_errors(); |
