How to set the email connection expiration time for password retrieval

Source: Internet
Author: User
How to set the connection expiration time in the email after retrieving the password is shown in the following figure: I have used PHPMailer to send emails.
However, how should I generate a hyperlink to change the password that should be sent to the user, and how should I control its expiration time?
Please give me some advice.


Reply to discussion (solution)

Please give me some advice...

Please give me some advice...

The generated string should be encrypted based on the parameters required on the page. As for the expiration time, you can pass a value of the past sending time in the parameter, when he clicks, he just gets the time and makes a judgment...


I never did. Makr ~~

First, you will send an email address to connect to the Member. the connection parameter can be composed of the domain name of your website, the current time, and the member email address encryption, encryption method you can use the simplest Base64encode, and then separated by commas (,) these three parameters, similar to $ str = Base64encode ("www.aaa.com, aaaaa@qq.com "); when a member clicks a link in his/her mailbox, the member will jump back to your website and process the link on his/her own ~~

Reference http://www.helloweba.com/view-blog-228.html

Record 1 in the database at the time of sending, and compare the time difference during activation.

It has already been implemented. thank you!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.