How Magento send email to Password reset/changed of Customer?

Customer Password is reset or changed in Magento 2, Password Reset Mail is getting to the customer for password reset or changed action.

Magento_Customer Module is responsible for sending an email to the specific customers for a password reset action.

File Path:
Magento_Customer/Model/EmailNotification.php contains the function passwordReset().

passwordReset method is responsible for sending mail to the customer.

Default Email template identifier:

Email template filename:
password_reset.html (vendor/magento/module-customer/view/frontend/email)

You can change the email content of password reset via the admin panel,

  • Marketing -> Email Templates -> Click on Add New Template
    – Choose Load Default Template Tabs,
    – Load Reset Password Template and modify the template.
  • Set template from Stores -> Configuration -> Customers section -> Customer Configuration -> Password Options -> Reset Password Template.
  • Save Configuration

Clear Cache and check Password Reset email.