Skip to content

Commit

Permalink
fix message send
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarzin committed Jun 26, 2023
1 parent 8fbc672 commit 4d103a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Console/Commands/SendNotifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ public function handle()
$mail_from = config('deming.notification.mail-from');
$headers = [
'MIME-Version: 1.0',
'Content-type: text/html;charset=iso-8859-1',
'Content-type: text/html;charset=UTF-8',
'From: '. $mail_from,
];
$to_email = $user->email;
$mailSubject = config('deming.notification.mail-subject');
$message = $txt;

// Send mail
if (mail($to_email, '=?UTF-8?B?' . base64_encode($mailSubject) . '?=', $message, implode("\r\n", $headers), ' -f'. $mail_from)) {
if (mail($to_email, $mailSubject, $message, implode("\r\n", $headers), ' -f'. $mail_from)) {
Log::debug('Mail sent to '.$to_email);
} else {
Log::debug('Email sending fail.');
Expand Down

0 comments on commit 4d103a2

Please sign in to comment.