Home  >  Article  >  Backend Development  >  Solution to php email sending problem_PHP tutorial

Solution to php email sending problem_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:35:13749browse

When PHP sends an email, there is a verification error and you cannot log in. You need to re-enter the verification code or send a new verification code to the email.

In order to implement this function, I used the knowledge of how to send emails to the mailbox and obtain the login IP.

During this period, we have modified the login function of our system. For greater security, we have added a verification function for sending emails. When the user logs in, it is judged whether the login IP has been logged in before. If not, a verification code needs to be sent to the mailbox, and then the received verification code must be entered before logging in. If the verification code is correct and the time has not exceeded the specified time, you can Log in, and write down the IP and time of this login. If you log in with this IP in the future, you will not need to verify it. // www.jbxue.com

If the time exceeds, the verification code becomes invalid and needs to be sent again. If there is a verification error and you cannot log in, you need to re-enter the verification code or send a new verification code to your email. In order to implement this function, I used the knowledge of how to send emails to the mailbox and obtain the login IP. Let’s sort it out so you can check it out later.

Send email:

First, you need to download the compressed package of phpmail, then unzip it, and copy the unzipped file to the project.

Introduce files into the project.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/745142.htmlTechArticleWhen php sends an email, there is a verification error and you cannot log in. You need to re-enter the verification code, or send a new verification code to Mail. In order to achieve this function, I used how to send an email to the mailbox, and...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn