mailmerge.py: Use strip in server name

Using spaces in the dialog might lead to  incorrect server name
Change-Id: I29a1ffa867d2e415338accf98bb45c7d65b14fa2
Reviewed-on: https://gerrit.libreoffice.org/44052
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Xisco Fauli 2017-10-30 11:13:06 +01:00 committed by Caolán McNamara
parent a36f2d7a66
commit 55ad93f29b

View file

@ -91,7 +91,7 @@ class PyMailSMTPService(unohelper.Base, XSmtpService):
self.connectioncontext = xConnectionContext
if dbg:
print("PyMailSMTPService connect", file=dbgout)
server = xConnectionContext.getValueByName("ServerName")
server = xConnectionContext.getValueByName("ServerName").strip()
if dbg:
print("ServerName: " + server, file=dbgout)
port = int(xConnectionContext.getValueByName("Port"))
@ -405,7 +405,7 @@ class PyMailPOP3Service(unohelper.Base, XMailService):
print("Timeout: " + str(tout), file=dbgout)
self.server = poplib.POP3(server, port, timeout=tout)
print("AFTER", file=dbgout)
user = xAuthenticator.getUserName()
password = xAuthenticator.getPassword()
if sys.version < '3': # fdo#59249 i#105669 Python 2 needs "ascii"