Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    reset password email issue

    General Discussion
    5
    5
    876
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dsharma last edited by

      Hello,

      When i am using forgot password then it sends an email. via email an reset password link also comes. but when i click on this link to takes me to reset password template.

      there email fields is also there but i am unable to find how are you passing email in reset template.

      public function create(Request $request, $token = null)
      {
      return view($this->_config['view'])->with(
      ['token' => $token, 'email' => $request->email]
      );
      }
      in above function how are you using $request->email ?

      can you tell me how can i send email variable from here.

      Regards
      Deepak Sharma

      A 1 Reply Last reply Reply Quote 0
      • P
        prateek-webkul last edited by

        Hello deepak,

        To send email variable to template, follow below steps :

        1)Go to Webkul\Customer\src\Notifications\CustomerResetPassword. Replace toMail function with below code

        public function toMail($notifiable)
            {
                if (static::$toMailCallback) {
                    return call_user_func(static::$toMailCallback, $notifiable, $this->token);
                }
        
                return (new MailMessage)
                    ->subject(__('shop::app.mail.forget-password.subject') )
                    ->view('shop::emails.customer.forget-password', [
                        'user_name' => $notifiable->name,
                        'email' => $notifiable->email,
                        'token' => $this->token
                    ]);
            }
        
        1. Go to views\emails\customer\forget-password.blade.php of Shop package, pass email in route as below
        <a href="{{ route('customer.reset-password.create', ['token' => $token, 'email' => $email]) }}" style="padding: 10px 20px;background: #0041FF;color: #ffffff;text-transform: uppercase;text-decoration: none; font-size: 16px">
        {{ __('shop::app.mail.forget-password.reset-password') }}
         </a>
        

        3)Now, in your ResetPasswordController, you can get email in $request

        1 Reply Last reply Reply Quote 0
        • A
          Ahed @dsharma last edited by

          @dsharma
          please can you help me to solve the problem of the email not sent to reset password and help me to set the configration in the right place of env file

          1 Reply Last reply Reply Quote 0
          • sanjay-webkul
            sanjay-webkul last edited by

            @Ahed
            Please configure your credentails here

            1 Reply Last reply Reply Quote 0
            • C
              codebase last edited by codebase

              I am still facing the same issue in forgot password module and I have also added the credantials in .env file. Can someone help me in to this?

              I am getting below error
              "Email "" does not comply with addr-spec of RFC 2822."

              If I do : dd($request->only(['email']));

              It gives me below value :

              ^ array:1 [▼
              "email" => "@.com"
              ]

              (I can't disclose my email so keeping it *****)

              1 Reply Last reply Reply Quote 0
              • First post
                Last post