Sending emails through SMTP with PHP

Hi, this is my first blog post, and I am going to describe the process (that I recently had to take) to send emails with PHP and using a SMTP server. First of all what we need is a SMTP Server that we can get freely in Gmail or other Free Mail Services such as Zoho. Once signed up you need to know the server settings and credentials, usually the smtp server is a subdomain of said service so for example in Gmail the smtp would be: smtp.