Skip to main content

How to send emails using PHPmailer and GMAIL SMTP

By July 8, 2017August 5th, 2017PHP, SytaxHighlighter

Here I have tried how to send PHPMailer with attachment using SMTP configuration. For SMTP Configuration we here used GMAIL Auth. You can be used any Auth like SMTP2GO, SendGrid.

Download PHPMailer library.

PHPMailer Sample Code

Copy paste the following code in your editor and save with any filename with extension “.php” and try in your live server or local server. But Make sure you have to connect with internet with proper Auth details