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