title: SMTP e-mail dont works, 5.7.1 Client does not have permissions to send as this sender
body: <p>Morning, I cant understand why this code dont works! thanks, waiting awnsers :)</p>
  
  <pre><code>protected void Enviar_Click(object sender, EventArgs e)
      {
  
  
          var pass = new NetworkCredential();
          pass.UserName = "myuser@gmail.com";
          pass.Password = "password";
  
  
          var smtpClient = new SmtpClient();
  
          smtpClient.Port = 587;
          smtpClient.Host = "smtp.gmail.com";
          smtpClient.Credentials = pass;
          smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;
          smtpClient.EnableSsl = true;
          smtpClient.UseDefaultCredentials = false;
  
  
          var email = new MailMessage(pass.UserName, "myname@mywork.com.br", txtsubject.Text,
                                      "name   :  " + txtname.Text + "menssage  : " + txtMessage.Text);
  
          SMTP.Enviar(email);
      }
  </code></pre>