
- fix(email): transactional emails are all not sent if `Use system wide (transactional) email settings` is disabled and no other email provide is setup on the Notifications page - fix(email): no emails are sent if SMTP username and SMTP password are empty (which is the case in dev for example) - fix(email): Wrong test email notification is used, causing the transactional email test notification to fail if no email provider is set up on the Notifications page.
31 lines
706 B
PHP
31 lines
706 B
PHP
<?php
|
|
|
|
namespace App\Notifications\TransactionalEmails;
|
|
|
|
use App\Notifications\Channels\EmailChannel;
|
|
use App\Notifications\CustomEmailNotification;
|
|
use Illuminate\Notifications\Messages\MailMessage;
|
|
|
|
class Test extends CustomEmailNotification
|
|
{
|
|
public function __construct(public string $emails, public string $isTransactionalEmail)
|
|
{
|
|
$this->onQueue('high');
|
|
$this->isTransactionalEmail = true;
|
|
}
|
|
|
|
public function via(): array
|
|
{
|
|
return [EmailChannel::class];
|
|
}
|
|
|
|
public function toMail(): MailMessage
|
|
{
|
|
$mail = new MailMessage;
|
|
$mail->subject('Coolify: Test Email');
|
|
$mail->view('emails.test');
|
|
|
|
return $mail;
|
|
}
|
|
}
|