laravel-email-confirmation icon indicating copy to clipboard operation
laravel-email-confirmation copied to clipboard

Send Confirmation email outside of Registration

Open johnmain opened this issue 7 years ago • 2 comments

Is there a way to send a Confirmation Email outside of the Registration pages? I have an API method for a 3rd party tool that creates a user. However, I still would like the Email Confirmation email to go out.

johnmain avatar Oct 31 '17 20:10 johnmain

No way with this package, it's another story.

bestmomo avatar Nov 01 '17 21:11 bestmomo

Can't you just copy the registration code and to your new API call output?

        $this->validator($request->all())->validate();

        $user = $this->create($request->all());
        $user->confirmation_code = str_random(30);
        $user->save();

        event(new Registered($user));

        $this->notifyUser($user);

        return back()->with('confirmation-success', trans('confirmation::confirmation.message'));

shiroamada avatar Dec 21 '17 15:12 shiroamada