Solve the php mail sending problem. During this period, the login function of our system was modified. in order to be more secure, the Mail verification function was added. When a user logs on, he or she checks whether the logon ip address was previously logged on. for example, he modified the login function of our system during this time period. in order to be more secure, he or she added the mail verification function. When a user logs on, he or she determines whether the logon ip address has been previously logged on. if not, he or she needs to send a verification code to the mailbox and then enter the verification code he or she received before logging on, if the verification code is correct and the time does not exceed the specified time, you can log on and write down the ip address and time of the login. if you log on with this ip address later, you do not need to verify it. If the verification code expires, you must resend it. Verification error cannot be logged in. you need to re-enter the verification code or send a new verification code to your mailbox. To implement this function, I used the knowledge of how to send emails to my mailbox and obtain the logon ip address. Below, you can view it later.
Send email:
Download the phpmail compressed package, decompress it, and copy the extracted file to the project. Introduce files to the project.
The code is as follows:
Require ("phpmailer/class. phpmailer. php"); // the file path depends on the path in your project.
Bytes. When a user logs on, determine whether the logon ip address is previously logged on, such...