Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ticket/17058] Add if-sentence for $encode_eol for email headers #6426

Merged
merged 3 commits into from Nov 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions phpBB/includes/functions_messenger.php
Expand Up @@ -597,7 +597,7 @@ function msg_email()
$this->from = $board_contact;
}

$encode_eol = ($config['smtp_delivery']) ? "\r\n" : PHP_EOL;
$encode_eol = $config['smtp_delivery'] || PHP_VERSION_ID >= 80000 ? "\r\n" : PHP_EOL;

// Build to, cc and bcc strings
$to = $cc = $bcc = '';
Expand Down Expand Up @@ -629,7 +629,7 @@ function msg_email()
}
else
{
$result = phpbb_mail($mail_to, $this->subject, $this->msg, $headers, PHP_EOL, $err_msg);
$result = phpbb_mail($mail_to, $this->subject, $this->msg, $headers, $encode_eol, $err_msg);
}

if (!$result)
Expand Down Expand Up @@ -952,7 +952,8 @@ function process()
}
else
{
$result = phpbb_mail($to, $subject, $msg, $headers, PHP_EOL, $err_msg);
$encode_eol = $config['smtp_delivery'] || PHP_VERSION_ID >= 80000 ? "\r\n" : PHP_EOL;
$result = phpbb_mail($to, $subject, $msg, $headers, $encode_eol, $err_msg);
Crizz0 marked this conversation as resolved.
Show resolved Hide resolved
}

if (!$result)
Expand Down