After searching for days on how to do this I came across this question: Send email using the GMail SMTP server from a PHP page
Seems like exactly what I have been trying to achieve but I have had no success, maybe it's because I don't know how to do the HTML to work with this code?
for testing purposes I tried the code on the top voted question on the link I pasted and made a button that when you click it, it would go to the PHP file (No success).