Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29755

In laravel 5.5 password recover password is not working in Application but working using API testing tool POSTMAN

$
0
0

I am facing a stranger issue which is recover password email is not working in Application but working with API client tools like: POSTMAN.

public function recover(Request $request)
    {
        $credentials = json_decode(request()->getContent(),true);
        $user = User::where('email', $credentials['email'])->first();
        if (!$user) { $error_message = "Your email address was not found.";
            return response()->json(['success' => false, 'errors' => ['email'=> $error_message]], 401);
        }
        try { $sendMail = Password::sendResetLink($request->only('email'),
            function (Message $message)
            { $message->subject('Your Password Reset Link'); });
            return response()->json([ 'success' => true, 'data'=> ['message'=> 'A reset email has been sent! Please check your email.'] ]);
        }
        catch (\Exception $e) {
            //Return with errors
            $error_message = $e->getMessage();
            return response()->json(['success' => false, 'errors' => [$error_message]], 401);
        }
    }

we have used AWS SMTP setting in .ENV file.

Any one can provide solution why is there issue? Let me know if any further information require


Viewing all articles
Browse latest Browse all 29755

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>