Skip to content

Commit

Permalink
Merge pull request #954 from dbarzin/dev
Browse files Browse the repository at this point in the history
fix mail subject
  • Loading branch information
dbarzin authored Nov 11, 2024
2 parents 78c4800 + 5ce8960 commit 1fb5460
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Console/Commands/CertificateExpiracy.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ public function handle()

// Content
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = $subject;

// Optional: Add DKIM signing
$mail->DKIM_domain = env('MAIL_DKIM_DOMAIN');
Expand All @@ -127,6 +126,7 @@ public function handle()
$mail->DKIM_identity = $mail->From;

if ($group === null || $group === '1') {
$mail->Subject = subject;
$message = '<html><body>These certificates are about to exipre :<br><br>';
foreach ($certificates as $cert) {
$message .= $cert->end_validity . ' - ' . $cert->name . ' - ' . $cert->type . '<br>';
Expand All @@ -142,7 +142,7 @@ public function handle()
Log::debug("Mail sent to {$to_email}");
} else {
foreach ($certificates as $cert) {
$mailSubject = $subject . ' - ' . $cert->end_validity . ' - ' . $cert->name;
$mail->Subject = $subject . ' - ' . $cert->end_validity . ' - ' . $cert->name;
$message = $cert->description;

// Send mail
Expand Down

0 comments on commit 1fb5460

Please sign in to comment.