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' );