diff --git a/app/Mail/EmailVerification.php b/app/Mail/EmailVerification.php index ca91fcc1..43ec8cff 100644 --- a/app/Mail/EmailVerification.php +++ b/app/Mail/EmailVerification.php @@ -13,26 +13,16 @@ class EmailVerification extends Mailable public $url; - /** - * Create a new message instance. - * - * @return void - */ public function __construct($url) { $this->url = $url; } - /** - * Build the message. - * - * @return $this - */ public function build() { $site_name = option_localized('site_name'); - return $this->from(config('mail.from')) + return $this ->subject(trans('user.verification.mail.title', ['sitename' => $site_name])) ->view('mails.email-verification'); } diff --git a/app/Mail/ForgotPassword.php b/app/Mail/ForgotPassword.php index 12483cc9..d9ff681f 100644 --- a/app/Mail/ForgotPassword.php +++ b/app/Mail/ForgotPassword.php @@ -11,31 +11,18 @@ class ForgotPassword extends Mailable use Queueable; use SerializesModels; - /** - * @var string - */ public $url = ''; - /** - * Create a new message instance. - * - * @return void - */ public function __construct(string $url) { $this->url = $url; } - /** - * Build the message. - * - * @return $this - */ public function build() { $site_name = option_localized('site_name'); - return $this->from(config('mail.from')) + return $this ->subject(trans('auth.forgot.mail.title', ['sitename' => $site_name])) ->view('mails.password-reset'); } diff --git a/tests/HttpTest/ControllersTest/AuthControllerTest.php b/tests/HttpTest/ControllersTest/AuthControllerTest.php index ea6df590..614f9896 100644 --- a/tests/HttpTest/ControllersTest/AuthControllerTest.php +++ b/tests/HttpTest/ControllersTest/AuthControllerTest.php @@ -624,7 +624,6 @@ class AuthControllerTest extends TestCase $site_name = option_localized('site_name'); $mailable = new ForgotPassword('url'); $mailable->build(); - $this->assertTrue($mailable->hasFrom(config('mail.from.address'))); $this->assertEquals(trans('auth.forgot.mail.title', ['sitename' => $site_name]), $mailable->subject); $this->assertEquals('mails.password-reset', $mailable->view); } diff --git a/tests/HttpTest/ControllersTest/UserControllerTest.php b/tests/HttpTest/ControllersTest/UserControllerTest.php index d933ca8e..aecb0745 100644 --- a/tests/HttpTest/ControllersTest/UserControllerTest.php +++ b/tests/HttpTest/ControllersTest/UserControllerTest.php @@ -212,7 +212,6 @@ class UserControllerTest extends TestCase $site_name = option_localized('site_name'); $mailable = new EmailVerification('url'); $mailable->build(); - $this->assertTrue($mailable->hasFrom(config('mail.from.address'))); $this->assertEquals(trans('user.verification.mail.title', ['sitename' => $site_name]), $mailable->subject); $this->assertEquals('mails.email-verification', $mailable->view); }