blue-twilight/app/Mail/TestMailConfig.php

44 lines
918 B
PHP
Raw Permalink Normal View History

<?php
namespace App\Mail;
use App\Facade\Theme;
use App\Facade\UserConfig;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
class TestMailConfig extends Mailable
{
use Queueable, SerializesModels;
private $senderAddress;
private $senderName;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct($senderName, $senderAddress)
{
$this->senderName = $senderName;
$this->senderAddress = $senderAddress;
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
$subject = trans('email.test_email_subject', ['app_name' => UserConfig::get('app_name')]);
2016-09-06 14:19:16 +01:00
return $this
->subject($subject)
->view(Theme::viewName('email.test_email'))
->with(['subject' => $subject]);
}
}