Activating account with php oop language

To activate a user account, you must send a hashed link to the user’s email. Once the link is sent, the user will then click on that link and get redirected back to the activation page. The activation page will change the user’s account to be activated.

I am strongly going to suggest you right now NOT to use the mail() functions to send any emails. This function is known to not “work” as many noobies put it. The simple reason behind it not “working” is because this function is simply not reliable. There is NO 100% guarantee that this function will send your emails 100% of the time. Even with a proper setup, this function will not send the email 100% of the time.

To avoid any inconvenience, use either PHPMailer or SwiftMailer. These two use something called SMTP. SMTP takes more steps to set up and gives you a way better chance of sending emails. Well, more like 100% chance of sending emails. The only time when they fail is when you use the wrong SMTP settings or you have something blocking it either a firewall or a spam filter.