Reset Password E-mail¶
A Reset Password E-mail is automatically sent to a user who requested a password change through the Forgotten Password form. This e-mail should contain the user’s login, info about your website and the main part - a link for password reset.
There are some conditions you must fulfil in order to use this e-mail successfully:
Create a Page with the a Forgotten Password form. Through this widget registered users can request a password change by inserting their login or e-mail address connected to their account.
After that the Reset Password E-mail should be sent to them. It means you have to code and create the e-mail itself (its template). This e-mail has to contain a reset password link which leads to a Reset Password Page Special Page - this link is generated automatically.
You need to create a page that contains the Reset Password form. This Page has to be subsequently defined as a “Secure Reset Password Page” in the Special Pages application (located in the Tools and Settings in Editor of Website). For more information about Special Pages visit their help-site.
The Reset Password E-mail can work properly only in case you have all prerequisites accomplished.
In the Templates application (a particular website editor, Tools and Settings tab) you define only a template. You are not able to determine the sending of it here. The sending is defined in the E-shop Settings application later (after the template is done and completed).
Code the e-mail template for the Reset Password E-mail in a particular website editor in the Templates application. Remember that you are defining only a template, not its purpose.
Use the E-mail Template Parameters help-site to display personalized data (such as user’s login, info about your website and the main part - a link for password reset). Primary focus on the Customer’s Template section.
This piece of code will automatically generate a link for password reset which leads to the Secure Reset Password Page Special Page which should contain the Reset Password Widget:
<a href="{{ website.specialPages.secureResetPassword.url }}?changeHash={{ user.changePwdHash }}">{{ website.specialPages.secureResetPassword.url }}</a>
Define the sending of the template:
Navigate to the CMS module, run the Website Editor for the website on which you want to define this Reset Password E-mail (select the Website and click Edit button in the toolbar). Go to the “Tools and Settings” and run the Security application. Here in the E-mails section are the Account E-mails added.
Click the Add button and in the E-mail Type field select the Reset Password. In Template select the name of the particular t-mail template you created in the Templates application before.
The From Label field defines a name that will be displayed to the customer in the e-mail. Notice that this field can be translated in case you have a multilingual online store.
The From field should contain an e-mail address from which this email will be sent. For example an e-mail you use for storing customer support.
The Subject field is a subject of this e-mail that is displayed to the customer (together with From Label). For example “Our E-Shop - Password Reset”.
When you are done, click the Add button and also the Save button in the upper left corner of the Security application. Approve your project and after that your e-mail will be automatically sent to users when they request a password reset.