gdiasdasilva /
benfica-live
| 1 | <?php |
||
| 2 | |||
| 3 | namespace App\Mail; |
||
| 4 | |||
| 5 | use Illuminate\Bus\Queueable; |
||
| 6 | use Illuminate\Mail\Mailable; |
||
| 7 | use Illuminate\Queue\SerializesModels; |
||
| 8 | use Illuminate\Contracts\Queue\ShouldQueue; |
||
| 9 | |||
| 10 | use App\ContactMessage; |
||
| 11 | |||
| 12 | class ContactSubmitted extends Mailable |
||
| 13 | { |
||
| 14 | use Queueable, SerializesModels; |
||
|
0 ignored issues
–
show
introduced
by
Loading history...
|
|||
| 15 | |||
| 16 | public $contactMessage; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Create a new message instance. |
||
| 20 | * |
||
| 21 | * @param ContactMessage $contactMessage |
||
| 22 | */ |
||
| 23 | public function __construct(ContactMessage $contactMessage) |
||
| 24 | { |
||
| 25 | $this->contactMessage = $contactMessage; |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Build the message. |
||
| 30 | * |
||
| 31 | * @return $this |
||
| 32 | */ |
||
| 33 | public function build() |
||
| 34 | { |
||
| 35 | return $this |
||
| 36 | ->from($this->contactMessage->email, $this->contactMessage->name) |
||
| 37 | ->subject('Formulário de Contacto - benfica.live') |
||
| 38 | ->markdown('emails.message-submitted-admin'); |
||
| 39 | } |
||
| 40 | } |
||
| 41 |