title: Setting mail server in wso2 identity server 5.3
body: <p>I am getting crazy in setting email server for password recovery.</p>
  
  <p>I have followed password recovery guide <a href="https://docs.wso2.com/display/IS530/Password+Recovery" rel="nofollow noreferrer">1</a>.
  When I try to recover the password the GUI informs me that the email has been sent correctly but on the logs I find the following exception:</p>
  
  <pre><code>[2017-03-08 09:24:42,913] ERROR -  Event dropped at Output Adapter 'EmailPublish
  er' for tenant id '-1234', Error in message format, null {org.wso2.carbon.event.
  output.adapter.email.EmailEventAdapter}
  javax.mail.AuthenticationFailedException
          at javax.mail.Service.connect(Service.java:306)
          at javax.mail.Service.connect(Service.java:156)
          at javax.mail.Service.connect(Service.java:105)
          at javax.mail.Transport.send0(Transport.java:168)
          at javax.mail.Transport.send(Transport.java:98)
          at org.wso2.carbon.event.output.adapter.email.EmailEventAdapter$EmailSen
  der.run(EmailEventAdapter.java:306)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:51
  1)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
  java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
  .java:617)
          at java.lang.Thread.run(Thread.java:745)
  </code></pre>
  
  <p>I have done many temptatives. I have included in wso2is-5.3.0\repository\conf\axis2.xml a configuration for gmail. Then I have tried with a configuration for our enterpise server. Finally I wrote a java program to check eventual network configuration problems and I was able to send email both with gmail and with our internal email server.
  Please find here the two configurations that I tried:
  GMAIL</p>
  
  <pre><code> &lt;transportSender name="mailto"
                       class="org.apache.axis2.transport.mail.MailTransportSender"&gt;
          &lt;parameter name="mail.smtp.from"&gt;********@gmail.com&lt;/parameter&gt;
          &lt;parameter name="mail.smtp.user"&gt;********&lt;/parameter&gt;
          &lt;parameter name="mail.smtp.password"&gt;********&lt;/parameter&gt;
          &lt;parameter name="mail.smtp.host"&gt;smtp.gmail.com&lt;/parameter&gt;
          &lt;parameter name="mail.smtp.port"&gt;587&lt;/parameter&gt;
          &lt;parameter name="mail.smtp.starttls.enable"&gt;true&lt;/parameter&gt;
          &lt;parameter name="mail.smtp.auth"&gt;true&lt;/parameter&gt;
  &lt;/transportSender&gt;
  </code></pre>
  
  <p>I have already set in gmail the security setting related to accept "less secure clients" and I am able to exploit the gmail account with another framework (jasper report).</p>
  
  <p>Enterprise Email Server</p>
  
  <pre><code>&lt;transportSender name="mailto"
                       class="org.apache.axis2.transport.mail.MailTransportSender"&gt;
          &lt;parameter name="mail.smtp.from"&gt;*********&lt;/parameter&gt;
          &lt;parameter name="mail.smtp.user"&gt;********&lt;/parameter&gt;
          &lt;parameter name="mail.smtp.password"&gt;*********&lt;/parameter&gt;
          &lt;parameter name="mail.smtp.host"&gt;mailer.******.it&lt;/parameter&gt;
          &lt;parameter name="mail.smtp.port"&gt;25&lt;/parameter&gt;
          &lt;parameter name="mail.smtp.starttls.enable"&gt;false&lt;/parameter&gt;
          &lt;parameter name="mail.smtp.auth"&gt;true&lt;/parameter&gt;
      &lt;/transportSender&gt;
  </code></pre>
  
  <p>Thanks in advance..
  - Giovanni (A poor developer :-))</p>