Just in caser anyone ends here like me. In may case despite having enabled unsecure access to my google account, it refused to send the email throwing an SMTP ERROR: Password command failed: 534-5.7.14.
(Solution found at https://know.mailsbestfriend.com/smtp_error_password_command_failed_5345714-1194946499.shtml)
Steps:
log into your google account
Go to https://accounts.google.com/b/0/DisplayUnlockCaptcha and click continue to enable.
Setup your phpmailer as smtp with ssl:
$mail = new PHPMailer(true);
$mail->CharSet ="utf-8";
$mail->SMTPDebug = SMTP::DEBUG_SERVER; // or 0 for no debuggin at all
$mail->isSMTP();
$mail->Host = 'smtp.gmail.com';
$mail->Port = 465;
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;
$mail->SMTPAuth = true;
$mail->Username = 'yourgmailaccount';
$mail->Password = 'yourpassword';
And the other $mail object properties as needed.
Hope it helps someone!!