What is SMTP PHPMailer?
SMTP is a protocol used by mail clients to send an email send request to a mail server. Once the mail server verifies the email, it sends it to the destination mail server. Here's an example of sending an email from Gmail's mail server from your domain. You don't need a local mail server to run the code.