title: spring - config spring email
body: <p>I used the springmail to send email from my smtp server with the following config:</p>
  
  <pre><code>&lt;bean id="springEmailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl"&gt;
      &lt;property name="defaultEncoding" value="UTF-8"/&gt;
      &lt;property name="host" value="mail.myserver.com"/&gt;
      &lt;property name="port" value="25"/&gt;
  
      &lt;property name="username" value="username"/&gt;
      &lt;property name="password" value="password"/&gt;
      &lt;property name="javaMailProperties"&gt;
          &lt;value&gt; 
              mail.debug=true 
              mail.smtp.auth=true
              mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
              mail.smtp.socketFactory.fallback=false 
          &lt;/value&gt;
      &lt;/property&gt;&lt;/bean&gt;
  </code></pre>
  
  <p>But it throw "javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?"
  I've tested this config with gmail on port 465 and it worked. </p>
  
  <p>Please tell me what i've done wrong. Thank you</p>