lundi 22 février 2016

how to check email sent or not in laravel 5

guys ..i have a function to send a email for registered users..here how i am check email sent or not

$email=$details->email;
                    $subject = 'Looking for blood donor';
                    $status=Mail::send('emails.welcome', $data, function($message)
                        use($subject,$email){
                        $message->from('no-reply@bloodlink.com', 'Blood Link');
                        $message->bcc('no-reply@bloodlink.com');
                        $message->to($email)->subject($subject);
                    });

i am using if for check email sent or not but it not work..

if($status)
                    {
                            return Response::json(array(
                          'status'=>'success',
                         'data'=>("Your email has been sent successfully"
                            )
                         ), 200);
                    }
                    else
                    {
                        return Response::json(array(
                          'status'=>'error',
                         'data'=>("something went wrong..!!"
                            )
                         ), 200);
                    }

give me idea for check that..



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire