Test emails should work with any recipient email address for verification purposes, not just team members. Added an isTestNotification flag to both Test notification classes and modified EmailChannel to skip team membership validation for test notifications. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
31 lines
712 B
PHP
31 lines
712 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 bool $isTestNotification = true;
|
|
|
|
public function __construct(public string $emails, public bool $isTransactionalEmail = true)
|
|
{
|
|
$this->onQueue('high');
|
|
}
|
|
|
|
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;
|
|
}
|
|
}
|