sabrestoo's avatar

How to test default MAIL_FROM_ADDRESS

Hi everyone, does anybody know how to test that default values are being passed from the .env file. I have the MAIL_FROM_ADDRESS set in the .env file but when I try to test using

&& $mail->hasFrom('[email protected]');

as part of the test below, it fails. The test below passes but fails when the above code is added.

Mail::assertSent(EmailTemplate::class, function ($mail) { $mail->build(); return $mail->hasSubject('Attachment Test') && $mail->hasTo('[email protected]') && $mail->hasAttachment(public_path('storage\test.png')); });

0 likes
0 replies

Please or to participate in this conversation.