title: Getting error in java mail api PasswordAuthentication method
body: <p>I am trying to send mail using java mail api..Every thing is ok in the code except the Authenticator class .It is giving warning as ...</p>
  
  <pre><code>Constructor PasswordAuthentication can not be applied to given types.
  required java.lang.String,java.lang.char[]
  </code></pre>
  
  <p>Here is my code snippet where i am getting warning error but not able to resolve the issue...</p>
  
  <pre><code>Authenticator auth = new Authenticator() {
  
          @Override
          public PasswordAuthentication getPasswordAuthentication() {
   error           return new PasswordAuthentication(userName, password);
          }
      };
        error   Session session = Session.getInstance(properties, auth);
  </code></pre>
  
  <p>These two lines with //error is giving error in the code..</p>
  
  <p>Please help me.
  Thanks in advance..</p>