title: Phpmailer using own domain
body: <p>how i can use my email like example@domain.ph in phpmailer. because i always have an error even i have a correct credentials.</p>
  
  <p>2020-05-14 09:21:24 SERVER -&gt; CLIENT: 220 smtp.gmail.com ESMTP e13sm1851788pfh.19 - gsmtp<br>
  2020-05-14 09:21:24 CLIENT -&gt; SERVER: EHLO localhost<br>
  2020-05-14 09:21:24 SERVER -&gt; CLIENT: 250-smtp.gmail.com at your service, [114.108.210.106]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8<br>
  2020-05-14 09:21:25 CLIENT -&gt; SERVER: AUTH LOGIN<br>
  2020-05-14 09:21:25 SERVER -&gt; CLIENT: 334 VXNlcm5hbWU6<br>
  2020-05-14 09:21:25 CLIENT -&gt; SERVER: [credentials hidden]<br>
  2020-05-14 09:21:25 SERVER -&gt; CLIENT: 334 UGFzc3dvcmQ6<br>
  2020-05-14 09:21:25 CLIENT -&gt; SERVER: [credentials hidden]<br>
  2020-05-14 09:21:25 SERVER -&gt; CLIENT: 535-5.7.8 Username and Password not accepted. Learn more at535 5.7.8  <a href="https://support.google.com/mail/?p=BadCredentials" rel="nofollow noreferrer">https://support.google.com/mail/?p=BadCredentials</a> e13sm1851788pfh.19 - gsmtp<br>
  2020-05-14 09:21:25 SMTP ERROR: Password command failed: 535-5.7.8 Username and Password not accepted. Learn more at535 5.7.8  <a href="https://support.google.com/mail/?p=BadCredentials" rel="nofollow noreferrer">https://support.google.com/mail/?p=BadCredentials</a> e13sm1851788pfh.19 - gsmtp<br>
  SMTP Error: Could not authenticate.<br>
  2020-05-14 09:21:25 CLIENT -&gt; SERVER: QUIT<br>
  2020-05-14 09:21:25 SERVER -&gt; CLIENT: 221 2.0.0 closing connection e13sm1851788pfh.19 - gsmtp<br>
  SMTP Error: Could not authenticate.<br></p>
  
  <p>this is my configuration:</p>
  
  <pre><code>$mail-&gt;isSMTP();
  $mail-&gt;Host = 'smtp.gmail.com';
  $mail-&gt;SMTPAuth = true;
  $mail-&gt;SMTPAutoTLS = true; 
  $mail-&gt;Username = 'example@domain.ph';
  $mail-&gt;Password = '';
  $mail-&gt;SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
  $mail-&gt;Port = 587;
  </code></pre>