Preview:
function Computec_send_mail_using_smtp( $phpmailer ) {

$phpmailer->isSMTP();

$phpmailer->IsHTML(true);

$phpmailer->Host = 'smtp.gmail.com';

$phpmailer->Port = 587;

$phpmailer->Username = 'email@gmail.com';

$phpmailer->Password = 'some password';

$phpmailer->SMTPAuth = true;

$phpmailer->SMTPSecure = 'tls';

$phpmailer->From = 'email@gmail.com';

$phpmailer->FromName = get_bloginfo( 'name' );

}

add_action( 'phpmailer_init', 'Computec_send_mail_using_smtp' );
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter