trivia: coding style

This commit is contained in:
Hardway Hou 2022-05-24 20:49:01 +08:00
parent b91ffae292
commit 9e557501fa
1 changed files with 5 additions and 6 deletions

View File

@ -47,12 +47,11 @@ class Mailer {
$headers = [ "From: $from_combined" ];
if($message_html){
$headers[]="MIME-Version: 1.0";
$headers[]="Content-Type: text/html; charset=UTF-8";
}
else{
$headers[]="Content-Type: text/plain; charset=UTF-8";
if ($message_html) {
$headers[] = "MIME-Version: 1.0";
$headers[] = "Content-Type: text/html; charset=UTF-8";
} else {
$headers[] = "Content-Type: text/plain; charset=UTF-8";
}
$rc = mail($to_combined, $subject, $message, implode("\r\n", array_merge($headers, $additional_headers)));