Contact forms can use PHP mail() function or SMTP authentication to send emails. With the PHP mail() function, you are sending emails directly from your web server without any form of authentication. Unlike the PHP mail(), SMTP authentication let you use the mail server of your choice by specifying the username and password of the email account. If the details are valid, the email is accepted and delivered to the designated recipient.