public function sendVerificationEmail(IlluminateModel $user)
    {
        if (empty($user)) {
            throw new ResetPasswordNoUserException('Could not find any user with those credentials');
        }

        // Generate email verification token
        $token = $this->generateEmailVerificationToken($user);

        // Generate email verification domain
        $domain = env('NODES_ENV', false) ? sprintf('https://%s.%s', env('APP_NAME'), env('APP_DOMAIN')) : config('app.url');

        // Send e-mail with instructions on how to reset password
        $status = (bool) Mail::send([
            'html' => config('nodes.api.email-verification.views.html', 'nodes.api::email-verification.emails.html'),
            'text' => config('nodes.api.email-verification.views.text', 'nodes.api::email-verification.emails.text'),
        ], [
            'user' => $user,
            'domain' => $domain,
            'email' => $user->email,
            'token' => $token,
            'expire' => config('nodes.api.email-verification.expire'),
            'senderName' => (config('nodes.api.email-verification.from.name') != 'Nodes') ? config('nodes.api.email-verification.from.name') : config('nodes.project.name'),
        ], function ($message) use ($user) {
            $message->to($user->email)
                ->from(config('nodes.api.email-verification.from.email', 'no-reply@nodes.dk'), config('nodes.api.email-verification.from.name', 'Nodes'))
                ->subject(config('nodes.api.email-verification.subject', 'Email verification request'));
        });

        return $status;
    }
public function sendVerificationEmail(IlluminateModel $user)
    {
        if (empty($user)) {
            throw new ResetPasswordNoUserException('Could not find any user with those credentials');
        }

        // Generate email verification token
        $token = $this->generateEmailVerificationToken($user);

        // Generate email verification domain
        $domain = env('NODES_ENV', false) ? sprintf('https://%s.%s', env('APP_NAME'), env('APP_DOMAIN')) : config('app.url');

        // Send e-mail with instructions on how to reset password
        $status = (bool) Mail::send([
            'html' => config('nodes.api.email-verification.views.html', 'nodes.api::email-verification.emails.html'),
            'text' => config('nodes.api.email-verification.views.text', 'nodes.api::email-verification.emails.text'),
        ], [
            'user' => $user,
            'domain' => $domain,
            'email' => $user->email,
            'token' => $token,
            'expire' => config('nodes.api.email-verification.expire'),
            'senderName' => (config('nodes.api.email-verification.from.name') != 'Nodes') ? config('nodes.api.email-verification.from.name') : config('nodes.project.name'),
        ], function ($message) use ($user) {
            $message->to($user->email)
                ->from(config('nodes.api.email-verification.from.email', 'no-reply@nodes.dk'), config('nodes.api.email-verification.from.name', 'Nodes'))
                ->subject(config('nodes.api.email-verification.subject', 'Email verification request'));
        });

        return $status;
    }
public function sendVerificationEmail ( IlluminateModel $ user ) { if ( empty ( $ user ) ) { throw new ResetPasswordNoUserException ( 'Could not find any user with those credentials' ) ; } // Generate email verification token $ token = $ this -> generateEmailVerificationToken ( $ user ) ; // Generate email verification domain $ domain = env ( 'NODES_ENV' , false ) ? sprintf ( 'https://%s.%s' , env ( 'APP_NAME' ) , env ( 'APP_DOMAIN' ) ) : config ( 'app.url' ) ; // Send e-mail with instructions on how to reset password $ status = ( bool ) Mail :: send ( [ 'html' => config ( 'nodes.api.email-verification.views.html' , 'nodes.api::email-verification.emails.html' ) , 'text' => config ( 'nodes.api.email-verification.views.text' , 'nodes.api::email-verification.emails.text' ) , ] , [ 'user' => $ user , 'domain' => $ domain , 'email' => $ user -> email , 'token' => $ token , 'expire' => config ( 'nodes.api.email-verification.expire' ) , 'senderName' => ( config ( 'nodes.api.email-verification.from.name' ) != 'Nodes' ) ? config ( 'nodes.api.email-verification.from.name' ) : config ( 'nodes.project.name' ) , ] , function ( $ message ) use ( $ user ) { $ message -> to ( $ user -> email ) -> from ( config ( 'nodes.api.email-verification.from.email' , 'no-reply@nodes.dk' ) , config ( 'nodes.api.email-verification.from.name' , 'Nodes' ) ) -> subject ( config ( 'nodes.api.email-verification.subject' , 'Email verification request' ) ) ; } ) ; return $ status ; }
Generate and send a email with link instructions.

@author Paulius Navickas <pana@nodes.dk>

@param  \Illuminate\Database\Eloquent\Model $user
@return bool
@throws \Nodes\Api\Auth\Exceptions\ResetPasswordNoUserException
Generate and send a email with link instructions .