NNTmux /
newznab-tmux
| 1 | <?php |
||
| 2 | |||
| 3 | namespace App\Mail; |
||
| 4 | |||
| 5 | use Illuminate\Bus\Queueable; |
||
| 6 | use Illuminate\Mail\Mailable; |
||
| 7 | use Illuminate\Queue\SerializesModels; |
||
| 8 | |||
| 9 | class ContactUs extends Mailable |
||
| 10 | { |
||
| 11 | use Queueable, SerializesModels; |
||
|
0 ignored issues
–
show
introduced
by
Loading history...
|
|||
| 12 | |||
| 13 | public string $mailFrom; |
||
| 14 | |||
| 15 | public string $mailBody; |
||
| 16 | |||
| 17 | public string $mailTo; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Create a new message instance. |
||
| 21 | */ |
||
| 22 | public function __construct($mailTo, $mailFrom, $mailBody) |
||
| 23 | { |
||
| 24 | $this->mailTo = $mailTo; |
||
| 25 | $this->mailFrom = $mailFrom; |
||
| 26 | $this->mailBody = $mailBody; |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Build the message. |
||
| 31 | * |
||
| 32 | * |
||
| 33 | * @throws \Exception |
||
| 34 | */ |
||
| 35 | public function build(): static |
||
| 36 | { |
||
| 37 | return $this->from($this->mailTo)->subject('Contact form submitted')->replyTo($this->mailFrom)->view('emails.contactUs')->with(['mailBody' => $this->mailBody]); |
||
| 38 | } |
||
| 39 | } |
||
| 40 |