One important feature of OpenCart is that it can connect to an SMTP server to send notification emails at various events happening within opencart. It can send emails for events like addition of reward points to a users account. Here we will see how to utilize gmail SMTP server for sending emails from store. Learn More
In this article, I will teach you how to apply CSTF token and form validation for contact us page.
- Add a hidden CSRF token in the contact form to defend against CSRF attack. System will validate the CSRF token when a request is sent to server to send message in the store front.
- If the client token is different with the token saved in the server, the request will be ignored and redirect it to the contact us page again.