<?php

namespace Modules\Admin\app\Emails;

use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;

class ResetPasswordMail extends Mailable
{
    use Queueable, SerializesModels;

    protected $email;
    protected $name;
    protected $forgot_code;

    /**
     * Reset after change password successfully
     *
     * @param string $email
     * @param string $name
     */
    public function __construct($email, $name)
    {
        $this->email = $email;
        $this->name = $name;

        $this->to($email);
        $this->subject('Reset Password Successfully');
        $this->replyTo(config('mail.from.address'));
    }

    /**
     * Build the message.
     */
    public function build(): self
    {
        return $this->view('admin::mails/reset_password_success', get_object_vars($this));
    }
}
