Bug 59249 - Mail merge setting test stopped working
Summary: Mail merge setting test stopped working
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.0.1 rc
Hardware: Other All
: high critical
Assignee: Not Assigned
URL:
Whiteboard: target:4.1.0 target:4.0.0.2
Keywords:
: 59062 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-01-11 16:21 UTC by Petr Mladek
Modified: 2013-01-14 19:59 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Mladek 2013-01-11 16:21:17 UTC
The mail merge test setting stopped working in LO-4.0.0.1 on Linux.

Steps to reproduce:

1. Open Tools/Options/LibreOffice Writer/Mail Merge E-mail
2. Enter a valid server name (I use relay.suse.de)
3. Press the button "Test Settings..."

Result: It could establish server connection but it can't find the mail server. I get the error message:

--- cut ---
 LibreOffice could not connect to the outgoing mail server. Check your system's settings and the settings in LibreOffice. Check the server name, the port and the secure connections settings
--
<class 'smtplib.SMTPException'>: SMTP AUTH extension not supported by server., traceback follows
  /opt/libreoffice4.0/program/python-core-3.3.0/lib/smtplib.py:594 in function login() [raise SMTPException("SMTP AUTH extension not supported by server.")]
  /opt/libreoffice4.0/program/mailmerge.py:107 in function connect() [self.server.login(user, password)]
--- cut ---

The same setting works with older buils or with LO-3.6. Also I am using this mail server every day. SO, it should not be problem on the server side.

I wonder if it might be related to the bug #59248.

Well, the python somehow works. At least "Tools/Macros/Organize Macros/Python/LibreOffice Macros/Hellow World" prints the "Hello World (in Python)" string.
Comment 1 Stephan Bergmann 2013-01-11 16:31:59 UTC
I can reproduce this with the libreoffice-4-0 build with which I cannot reproduce bug 59248.  Might be a problem with Python 3.
Comment 2 Not Assigned 2013-01-11 17:30:24 UTC
Stephan Bergmann committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7a7e19c166df326c45f76a142b478b0629f784c9

fdo#59249: String literal needs a "b" prefix in Pyhton 3



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 3 Not Assigned 2013-01-11 18:12:40 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9dec0c79011a0c09068d86fba9387c67da84a39b

fdo#59249: mailmerge.py: some more bytes vs. str mangling



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 4 Not Assigned 2013-01-11 18:18:40 UTC
Stephan Bergmann committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f49e469d93749547520ae34c52d26f17bcc32cf7&h=libreoffice-4-0

fdo#59249: String literal needs a "b" prefix in Pyhton 3


It will be available in LibreOffice 4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 5 Michael Stahl (allotropia) 2013-01-11 18:21:52 UTC
that looks like it should fix it, "b" prefix works in both 2.7 and 3.

there were some more obvious problems with concatenation of "str" and "bytes" which is not possible in Python3, but only in debug code.

of course this mailmerge.py was just quickly converted to Python3
looking for most obvious problems and never tested; would be great
if somebody who knows how to actually use it could do that :)
Comment 6 Jean-Baptiste Faure 2013-01-11 20:30:25 UTC
Hmmm, seems to not be enough for fixing the problem for me. I think that this bug report was a duplicate of bug 59062. With the fix in LO 4.0.0.1+ I get the same error message as in https://bugs.freedesktop.org/show_bug.cgi?id=59062#c2 :
--
<class 'AttributeError'>: 'bytes' object has no attribute 'encode', traceback follows
  /home/jbf/LibO/master/solver/unxlngx6.pro/installation/opt/program/python-core-3.3.0/lib/smtplib.py:623 in function login() ["%s %s" % (AUTH_LOGIN, encode_base64(user.encode('ascii'), eol='')))]
  /home/jbf/LibO/master/solver/unxlngx6.pro/installation/opt/program/mailmerge.py:107 in function connect() [self.server.login(user, password)]

Best regards. JBF
Comment 7 Not Assigned 2013-01-14 11:45:56 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b08dc0b7777f48cef97e90ae1f4633591add680b

Revert "fdo#59249: mailmerge.py: some more bytes vs. str mangling"



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 8 Not Assigned 2013-01-14 11:46:13 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1a5b3d8e4d88aa27647cc7b99623dd6f6e706bbc

fdo#59249: mailmerge.py: adapt to changes in smtplib:



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 9 Not Assigned 2013-01-14 18:58:01 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e523186e59632ef824eb3262edd0c63e388af6e8&h=libreoffice-4-0

fdo#59249: mailmerge.py: adapt to changes in smtplib:


It will be available in LibreOffice 4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 10 Jean-Baptiste Faure 2013-01-14 19:56:24 UTC
It works now in Version 4.0.0.1+ (Build ID: e523186e59632ef824eb3262edd0c63e388af6e) under Ubuntu 12.04 x86-64.

Thank you very much for the fix.

Best regards. JBF
Comment 11 Jean-Baptiste Faure 2013-01-14 19:59:23 UTC
*** Bug 59062 has been marked as a duplicate of this bug. ***