1/**
2 * Send Mail from Parts Specification Form
3 */
4public function sendMail(Request $request) {
5 $data = $request->all();
6
7 $messageBody = $this->getMessageBody($data);
8
9 Mail::raw($messageBody, function ($message) {
10 $message->from('yourEmail@domain.com', 'Learning Laravel');
11 $message->to('goper.zosa@gmail.com');
12 $message->subject('Learning Laravel test email');
13 });
14
15 // check for failures
16 if (Mail::failures()) {
17 // return response showing failed emails
18 }
19
20 // otherwise everything is okay ...
21 return redirect()->back();
22}
23
1@verbatim
2 <div class="container">
3 Hello, {{ name }}.
4 </div>
5@endverbatim
1/**
2 * Build the message.
3 *
4 * @return $this
5 */
6public function build()
7{
8 return $this->from('example@example.com')
9 ->markdown('emails.orders.shipped', [
10 'url' => $this->orderUrl,
11 ]);
12}