Kaydet (Commit) 55ad93f2 authored tarafından Xisco Fauli's avatar Xisco Fauli Kaydeden (comit) Caolán McNamara

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/44052Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst a36f2d7a
...@@ -91,7 +91,7 @@ class PyMailSMTPService(unohelper.Base, XSmtpService): ...@@ -91,7 +91,7 @@ class PyMailSMTPService(unohelper.Base, XSmtpService):
self.connectioncontext = xConnectionContext self.connectioncontext = xConnectionContext
if dbg: if dbg:
print("PyMailSMTPService connect", file=dbgout) print("PyMailSMTPService connect", file=dbgout)
server = xConnectionContext.getValueByName("ServerName") server = xConnectionContext.getValueByName("ServerName").strip()
if dbg: if dbg:
print("ServerName: " + server, file=dbgout) print("ServerName: " + server, file=dbgout)
port = int(xConnectionContext.getValueByName("Port")) port = int(xConnectionContext.getValueByName("Port"))
...@@ -405,7 +405,7 @@ class PyMailPOP3Service(unohelper.Base, XMailService): ...@@ -405,7 +405,7 @@ class PyMailPOP3Service(unohelper.Base, XMailService):
print("Timeout: " + str(tout), file=dbgout) print("Timeout: " + str(tout), file=dbgout)
self.server = poplib.POP3(server, port, timeout=tout) self.server = poplib.POP3(server, port, timeout=tout)
print("AFTER", file=dbgout) print("AFTER", file=dbgout)
user = xAuthenticator.getUserName() user = xAuthenticator.getUserName()
password = xAuthenticator.getPassword() password = xAuthenticator.getPassword()
if sys.version < '3': # fdo#59249 i#105669 Python 2 needs "ascii" if sys.version < '3': # fdo#59249 i#105669 Python 2 needs "ascii"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment