title: Why Username and Password not accepted when I send mail in php?
body: <p>Hi this is my problem:</p>
  
  <p>I want send a mail and this is my mail code: </p>
  
  <pre><code>&lt;?php
  
  require "vendor/autoload.php";
  
  class HelperMail{
  
    private $oPhpMailer;
  
  
      function __construct(){
  
          $this-&gt;oPhpMailer = new PHPMailer();
          $this-&gt;oPhpMailer-&gt;isSMTP();
          $this-&gt;oPhpMailer-&gt;SMTPDebug = 2;
          $this-&gt;oPhpMailer-&gt;Debugoutput = 'html';
          $this-&gt;oPhpMailer-&gt;SMTPSecure = 'tls';
          $this-&gt;oPhpMailer-&gt;SMTPAuth = true;
  
      }
              public function mailFrom($from,$usuario){
                $this-&gt;oPhpMailer-&gt;setFrom($from,$usuario);             
              }
              public function mailPort($puerto){
                $this-&gt;oPhpMailer-&gt;Port = $puerto;   
              }
              public function mailUsuario($usuario){
                $this-&gt;oPhpMailer-&gt;Username = $usuario;   
              }
              public function mailPassword($pass){
                $this-&gt;oPhpMailer-&gt;Password = $pass;       
              }
              public function mailHost($host){
                $this-&gt;oPhpMailer-&gt;Host = $host;      
              }
              public function mailSubject($subject){
                $this-&gt;oPhpMailer-&gt;Subject = $subject;       
              }
              public function mailAddress($address){
                $this-&gt;oPhpMailer-&gt;addAddress($address);     
              }
              public function mailAltBody(){
                $this-&gt;oPhpMailer-&gt;AltBody = 'This is a plain-text message body';     
              }
  
              public function mailHtml(){
  
              }
  
              public function setData ($usuarios){ 
  
                $htmlMail = $this-&gt;oPhpMailer-&gt;msgHTML(file_get_contents('helpers/mailAvisoSinTareasReg/contenido.html'));
                $htmlMailChange = str_replace("TRABAJO","LAZOS",$htmlMail);
                $this-&gt;sendMail();
              }
  
  
              public function sendMail(){
  
              if (!$this-&gt;oPhpMailer-&gt;send()) {
                          echo "Mailer Error: " . $this-&gt;oPhpMailer-&gt;ErrorInfo;
                      } else {
                          echo "Message sent!";
                      }
  
              }
      }
  ?&gt;
  </code></pre>
  
  <p>I have this error : </p>
  
  <p><a href="https://i.stack.imgur.com/WMove.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WMove.jpg" alt="enter image description here"></a></p>
  
  <p>I know that the user and pass are ok , so i don't know what is the problem.</p>
  
  <p>How can I fix this? , sorry for my english</p>