update
This commit is contained in:
@@ -65,7 +65,9 @@ class ExpiryMail implements ShouldQueue
|
||||
|
||||
try {
|
||||
$email = new ExpiryService($this->template_id,$data);
|
||||
Mail::to($product->Customer->email)->send($email);
|
||||
if (Mail::to($product->Customer->email)->send($email) === null) {
|
||||
return;
|
||||
}
|
||||
\App\Models\Mail::create([
|
||||
'template_id' => $this->template_id,
|
||||
'subject' => $email->envelope()->subject,
|
||||
|
||||
@@ -49,11 +49,11 @@ class SendMailCampaignRecipient implements ShouldQueue
|
||||
if ($bcc = EmailRecipients::parse($campaign->bcc)) {
|
||||
$mailer->bcc($bcc);
|
||||
}
|
||||
$mailer->send(new GenericTemplateMail(
|
||||
$failed = $mailer->send(new GenericTemplateMail(
|
||||
$rendered['subject'],
|
||||
$rendered['html'],
|
||||
Arr::only($campaign->template?->mailConfig() ?? [], ['from_email', 'from_name', 'reply_to', 'reply_to_name']),
|
||||
));
|
||||
)) === null;
|
||||
} catch (\Throwable $e) {
|
||||
$failed = true;
|
||||
Log::warning('Gửi email chiến dịch thất bại', [
|
||||
|
||||
@@ -37,6 +37,7 @@ class SendTemplateEmailJob implements ShouldQueue
|
||||
$rendered['subject'],
|
||||
$rendered['html'],
|
||||
$template->mailConfig(),
|
||||
$this->scenario,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user