Bug 139072 - Mailmerge to email: content mismatched with email address after first email
Summary: Mailmerge to email: content mismatched with email address after first email
Status: RESOLVED DUPLICATE of bug 106959
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.6.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Mail-Merge
  Show dependency treegraph
 
Reported: 2020-12-19 16:21 UTC by John D Nash
Modified: 2021-09-13 14:50 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Spreadsheet, Document, email output (6 emails) as one .pdf (246.25 KB, application/pdf)
2020-12-19 16:21 UTC, John D Nash
Details
test spreadsheet (15.40 KB, application/vnd.oasis.opendocument.spreadsheet)
2020-12-19 16:26 UTC, John D Nash
Details
test document (104.39 KB, application/vnd.oasis.opendocument.text)
2020-12-19 16:27 UTC, John D Nash
Details
Version information (46.40 KB, image/png)
2020-12-19 16:29 UTC, John D Nash
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John D Nash 2020-12-19 16:21:10 UTC
Created attachment 168335 [details]
Spreadsheet, Document, email output (6 emails) as one .pdf

Source files attached to this report

1) create spreadsheet with data
2) create document with database fields from spreadsheet
3) perform mailmerge to email

Results (repeatable) 
first email is correct
second email has correct email address and content for first email
third email has correct email address and content for second email
fourth email has correct email address and content for third email

Sample outputs are attached to this report as .pdf files.

We live to serve,

-jdn-
Comment 1 John D Nash 2020-12-19 16:26:30 UTC
Created attachment 168337 [details]
test spreadsheet
Comment 2 John D Nash 2020-12-19 16:27:14 UTC
Created attachment 168338 [details]
test document
Comment 3 John D Nash 2020-12-19 16:29:37 UTC
Created attachment 168340 [details]
Version information
Comment 4 Dieter 2021-07-03 05:22:12 UTC
John, unfortunately nobody could confirm this bug report during the last months. So I'd like to ask, if it is still valid. Could you please try to reproduce it with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ? I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version.
Comment 5 John D Nash 2021-07-03 19:46:43 UTC
I will plan on running the test batch again at my office Tuesday when we open. Hopefully it has been corrected. It appeared to be a mis-match between two pointers, one pointing to email address and the other pointing to content, with the increment off by one on the content pointer.

NOTE: UNCONFIRMED IS NOT AN OPTION in the drop down combo list box labeled "resolved as" (id="resolution" name="resolution").
Comment 6 John D Nash 2021-07-03 19:51:34 UTC
Ah, "UNCONFIRMED" is in the list labeled Status. Gottit. I will re-run the test Tuesday. The initial problem caught me off guard as I was sending an annual mail blast to students in my classes, and it attached the wrong academic records.
Comment 7 QA Administrators 2021-07-04 04:37:53 UTC Comment hidden (obsolete)
Comment 8 John D Nash 2021-07-06 16:53:20 UTC
I started re-running the mail merge
Version: 6.4.7.2
Build ID: 1:6.4.7-0ubuntu0.20.04.1
CPU threads: 12; OS: Linux 5.4; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded

The mail merge to print performed correctly, as before. When attempting to run the mail merge to email using tools / mail merge wizard I encountered issues (a) the first time (only) Writer crashed in the Wizard when I pressed Finish, (b) I could not find a combination of email credentials that would work in tools / options / LibreOffice Writer / Mail Merge Email / Server Authentication. My server setup taken from ThunderBird, which is working, is imap, Server: smtp.office365.com, Port: 587 .

I cannot find a combination to allow me to continue the test. I used the most recent version of LibreOffice in the Mint / MATE repos. 

Opinion: This section of LibreOffice needs someone to adopt it until it is working smoothly. The initial problem appeared to be a simple index error (off by 1).
Comment 9 John D Nash 2021-07-06 16:56:23 UTC
If the group feels it is important, I will download the current version from the project site and try again. I'm not sure I can schedule time to review code and try to fix.
Comment 10 Dieter 2021-07-30 16:58:24 UTC
(In reply to John D Nash from comment #9)
> If the group feels it is important, I will download the current version from
> the project site and try again.

Yes, that would be helpful

> I'm not sure I can schedule time to review
> code and try to fix.
Nobody expects that! We just want to make sure, that the bug is still valid within the latest version of LO.
Comment 11 John D Nash 2021-07-30 19:52:55 UTC
OK. I'll set it up again and create some email addresses to use for testing. Probably not for at least three weeks as my personal load is unusually high right now. 

It was a simple mail merge if someone wants to try. Spreadsheet columns -> document fields as in the attached sample files.
Comment 12 Michael Weghorn 2021-08-31 08:55:00 UTC
Bug 119942 and this one might be related.
Comment 13 John D Nash 2021-08-31 19:38:16 UTC
(In reply to Dieter from comment #10)
> (In reply to John D Nash from comment #9)
> > If the group feels it is important, I will download the current version from
> > the project site and try again.
> 
> Yes, that would be helpful
> 
> > I'm not sure I can schedule time to review
> > code and try to fix.
> Nobody expects that! We just want to make sure, that the bug is still valid
> within the latest version of LO.

I am restarting testing. I will install the current LO & re-run the original merge to email, then I will create a new ods and odt with simplified text and run again. I am on the same computer as originally demonstrated the problem.  I will add to this comment to report. I got notes related to this bug on Bug 102998.
Comment 14 John D Nash 2021-08-31 20:34:43 UTC
I tried to restart testing. 

I installed Version: 7.2.0.4 / LibreOffice Community
Build ID: 9a9c6381e3f7a62afc1329bd359cc48accb6435b

Under tools / options / writer / mail merge email

I can not find a combination that will work. I tried my corporate email credentials on Office365 and my corporate credentials for google.com. I am copying the credentials and server settings from Thunderbird, where they do work.

When I reported Bug 139072 in December 2020 I successfully connected to email the first time. I'm stuck and can not run further test unless I can get the email to connect.  What am I missing?

error report is:

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 'imaplib.IMAP4.abort'>: unexpected response: b'220 CH0PR03CA0223.outlook.office365.com Microsoft ESMTP MAIL Service ready at Tue, 31 Aug 2021 20:07:00 +0000', traceback follows
  File "/opt/libreoffice7.2/program/mailmerge.py", line 315, in connect
    self.server = imaplib.IMAP4(server, port)
  File "/opt/libreoffice7.2/program/python-core-3.8.10/lib/imaplib.py", line 201, in __init__
    self._connect()
  File "/opt/libreoffice7.2/program/python-core-3.8.10/lib/imaplib.py", line 243, in _connect
    self.welcome = self._get_response()
  File "/opt/libreoffice7.2/program/python-core-3.8.10/lib/imaplib.py", line 1079, in _get_response
    raise self.abort("unexpected response: %r" % resp)
Comment 15 NISZ LibreOffice Team 2021-09-13 14:50:26 UTC
I can still confirm the problematic behavior in current nightly, but the example document begins with a table (which contains the company logo and address) which makes this the same problem as bug 106959.

*** This bug has been marked as a duplicate of bug 106959 ***