Add mail address for feedback mail

This commit is contained in:
2024-01-25 13:54:47 +01:00
parent ad8ca024ad
commit 7536e54f4a
2 changed files with 8 additions and 3 deletions

View File

@@ -17,7 +17,11 @@ class FeedbackController extends Controller
$data = ['name' => $name,'email'=> $email,'message'=> $message, 'subject' => $subject ];
Mail::to('jaro@ttx.sk')->send(new SendFeedbackMail($data));
Mail::send('mails.feedback', $data, function($message) {
$message->to('jaro@ttx.sk', 'Jaroslv Drzik')
->to('marosholub@gmail.com','Maros Holub')
->subject('IKEA Feedback Mail');
});
return response()->json(['success' => 'Send email successfully.']);
}

View File

@@ -25,6 +25,7 @@ class SendFeedbackMail extends Mailable
$this->data = $data;
}
/**
* Build the message.
*
@@ -32,6 +33,6 @@ class SendFeedbackMail extends Mailable
*/
public function build()
{
return $this->subject('IKEA Feedback Mail')->view('mails.feedback')->with(['data' => $this->data]);
return $this->subject('IKEA Feedback Mail')->cc('')->view('mails.feedback')->with(['data' => $this->data]);
}
}