diff options
author | Xisco Fauli <anistenis@gmail.com> | 2017-10-30 11:13:06 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-11-30 13:29:24 +0100 |
commit | 55ad93f29b1be106a7b475f92202ece3589584d8 (patch) | |
tree | 14ef6d28cda36b35867123daa4b643481afafbe6 /scripting | |
parent | a36f2d7a66e54e6cc296a565391f8b25396543e3 (diff) |
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>
Diffstat (limited to 'scripting')
-rw-r--r-- | scripting/source/pyprov/mailmerge.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripting/source/pyprov/mailmerge.py b/scripting/source/pyprov/mailmerge.py index 235472b2a85d..6034a74f1b03 100644 --- a/scripting/source/pyprov/mailmerge.py +++ b/scripting/source/pyprov/mailmerge.py @@ -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" |