<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - MAILMERGE: LibreOffice freezes when clicking Test Settings button"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=63388#c21">Comment # 21</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - MAILMERGE: LibreOffice freezes when clicking Test Settings button"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=63388">bug 63388</a>
              from <span class="vcard"><a class="email" href="mailto:jurassic.pork@orange.fr" title="Jurassic Pork <jurassic.pork@orange.fr>"> <span class="fn">Jurassic Pork</span></a>
</span></b>
        <pre>hello,
there is a problem when you use SMTP with the port 465 
you must use a smtplib.SMTP_SSL with this port.
Proposed code in mailmerge.py : 
                if port == 465:
                        self.server = smtplib.SMTP_SSL(server,
port,timeout=tout)
                else:
                        self.server = smtplib.SMTP(server, port,timeout=tout)

                if dbg and os.name != 'nt':
                        self.server.set_debuglevel(1)

                connectiontype =
xConnectionContext.getValueByName("ConnectionType")
                if dbg:
                        print("ConnectionType: " + connectiontype, file=dbgout)
                if connectiontype.upper() == 'SSL' and port != 465:
                        self.server.ehlo()
                        self.server.starttls()
                        self.server.ehlo()</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>