title: Mail sending failed using javamail : 550 5.7.1 Client does not have permissions to send as this sender
body: <p>I am unable to setup my javamail session to send an email using my private mail service provider. I am using an auhenticated starttls session and am getting this error : <code>550 5.7.1 Client does not have permissions to send as this sender</code>. Below is my mail session properties and debug trace :</p>
  
  <pre><code>mail.smtp.auth=true
  mail.smtp.host=smtp.myprovider.com
  mail.smtp.password=*****
  mail.smtp.port=587
  mail.smtp.starttls.enable=true
  mail.smtp.user=****
  
  javax.portlet.action[0] = sendMail
  DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
  DEBUG SMTP: useEhlo true, useAuth true
  DEBUG SMTP: trying to connect to host "smtp.myprovider.com", port 587, isSSL false
  220 smtp.myprovider.com Microsoft ESMTP MAIL Service ready at Tue, 2 Jun 2015 11:35:22 -0400
  DEBUG SMTP: connected to host "smtp.myprovider.com", port: 587
  
  EHLO sgmed001
  250-smtp.myprovider.com Hello [xx.xx.xx.xx]
  250-SIZE 52428800
  250-PIPELINING
  250-DSN
  250-ENHANCEDSTATUSCODES
  250-STARTTLS
  250-AUTH NTLM
  250-8BITMIME
  250-BINARYMIME
  250 CHUNKING
  DEBUG SMTP: Found extension "SIZE", arg "52428800"
  DEBUG SMTP: Found extension "PIPELINING", arg ""
  DEBUG SMTP: Found extension "DSN", arg ""
  DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
  DEBUG SMTP: Found extension "STARTTLS", arg ""
  DEBUG SMTP: Found extension "AUTH", arg "NTLM"
  DEBUG SMTP: Found extension "8BITMIME", arg ""
  DEBUG SMTP: Found extension "BINARYMIME", arg ""
  DEBUG SMTP: Found extension "CHUNKING", arg ""
  STARTTLS
  220 2.0.0 SMTP server ready
  EHLO sgmed001
  250-smtp.myprovider.com Hello [xx.xx.xx.xx]
  250-SIZE 52428800
  250-PIPELINING
  250-DSN
  250-ENHANCEDSTATUSCODES
  250-AUTH NTLM LOGIN
  250-8BITMIME
  250-BINARYMIME
  250 CHUNKING
  DEBUG SMTP: Found extension "SIZE", arg "52428800"
  DEBUG SMTP: Found extension "PIPELINING", arg ""
  DEBUG SMTP: Found extension "DSN", arg ""
  DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
  DEBUG SMTP: Found extension "AUTH", arg "NTLM LOGIN"
  DEBUG SMTP: Found extension "8BITMIME", arg ""
  DEBUG SMTP: Found extension "BINARYMIME", arg ""
  DEBUG SMTP: Found extension "CHUNKING", arg ""
  DEBUG SMTP: Attempt to authenticate
  AUTH LOGIN
  334 VXNlcm5hbWU6
  ****
  334 UGFzc3dvcmQ6
  ***
  235 2.7.0 Authentication successful
  DEBUG SMTP: use8bit false
  MAIL FROM:&lt;sender@xx.xx&gt;
  250 2.1.0 Sender OK
  RCPT TO:&lt;recipient@xx.xx&gt;
  250 2.1.5 Recipient OK
  DEBUG SMTP: Verified Addresses
  DEBUG SMTP:   recipient@xx.xx
  DATA
  354 Start mail input; end with &lt;CRLF&gt;.&lt;CRLF&gt;
  Date: Tue, 2 Jun 2015 11:35:23 -0400 (EDT)
  From: sender@xx.xx
  To: recipient@xx.xx
  Message-ID: &lt;53119439.11433259323689.JavaMail&gt;
  Subject: Request
  MIME-Version: 1.0
  Content-Type: text/html;charset="UTF-8"
  Content-Transfer-Encoding: 7bit
  X-Auto-Response-Suppress: AutoReply, DR, NDR, NRN, OOF, RN
  
  qweqwe
  .
  550 5.7.1 Client does not have permissions to send as this sender
  com.sun.mail.smtp.SMTPSendFailedException: 550 5.7.1 Client does not have permissions to send as this sender
  
      at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1388)
      at com.sun.mail.smtp.SMTPTransport.finishData(SMTPTransport.java:1215)
      at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:586)
      at com.liferay.util.mail.MailEngine._send(MailEngine.java:563)
      at com.liferay.util.mail.MailEngine.send(MailEngine.java:350)
      at com.liferay.util.mail.MailEngine.send(MailEngine.java:425)
      at com.liferay.mail.messaging.MailMessageListener.doMailMessage(MailMessageListener.java:93)
      at com.liferay.mail.messaging.MailMessageListener.doReceive(MailMessageListener.java:108)
      at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
      at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:72)
      at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:69)
      at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:682)
      at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:593)
      at java.lang.Thread.run(Thread.java:745)
  11:35:23,696 ERROR [liferay/mail-1][MailEngine:77] null
  com.sun.mail.smtp.SMTPSendFailedException: 550 5.7.1 Client does not have permissions to send as this sender_ [Sanitized]
      at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1388)
      at com.sun.mail.smtp.SMTPTransport.finishData(SMTPTransport.java:1215)
      at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:586)
      at com.liferay.util.mail.MailEngine._send(MailEngine.java:563)
      at com.liferay.util.mail.MailEngine.send(MailEngine.java:350)
      at com.liferay.util.mail.MailEngine.send(MailEngine.java:425)
      at com.liferay.mail.messaging.MailMessageListener.doMailMessage(MailMessageListener.java:93)
      at com.liferay.mail.messaging.MailMessageListener.doReceive(MailMessageListener.java:108)
      at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
      at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:72)
      at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:69)
      at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:682)
      at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:593)
      at java.lang.Thread.run(Thread.java:745)
  </code></pre>