set status code after mail sent in laravel code example
Example 1: laravel json response with error code
return Response::json([
'hello' => $value
], 201); // Status code here
Example 2: laravel return response view
return response()->view('your_view', compact('variableName'));