title: EmailException: Sending the email to the following server failed : smtp.gmail.com:465
body: <p>I wrote a program to send mail from my gmail account using scala Play 2.3.8
  then i got the following exception:</p>
  
  <blockquote>
    <p>[EmailException: Sending the email to the following server failed :
    smtp.gmail.com:465] at MailerPlugin.send(email)</p>
  </blockquote>
  
  <p>my code is as follows:</p>
  
  <pre><code>  val email = Email(
    "A personal mail",
    "LeeSa &lt;xxxxxx@gmail.com&gt;",
    Seq("Recepient &lt;yyyyyy@gmail.com&gt;"),
    // adds attachment
    attachments = Seq(
  
    ),
    bodyHtml = Some("""
    &lt;html&gt;
      &lt;body&gt;
      &lt;h3&gt;Hai ,&lt;/h3&gt;
      &lt;p&gt; This is a test message. &lt;/p&gt;
      &lt;/body&gt;
    &lt;/html&gt;
    """)
  )
  MailerPlugin.send(email)
  </code></pre>
  
  <p>application.conf contains the configuration</p>
  
  <pre><code>    smtp.host=smtp.gmail.com
      smtp.port=465
      smtp.ssl=yes
      smtp.tls=yes
      smtp.user="xxxxxxx@gmail.com"
      smtp.password="MyPassword"
  </code></pre>
  
  <p>Anyone can help me?</p>