Mail merge giving the message and hangs

I am trying to do a mail merge, but am getting the attached message and it’s not sending any emails. what could be the reason?
os : kubuntu 20.04 LTS
Screenshot from 2021-09-02 13-28-39

The screenshot is pointless in analyzing such problem. From my perspective:

  • Set dbg = True in which is in subfolder program of your LibreOffice installation - The correct installation directory depends on your installation package being used, which you did not mention. It’s highly recommended to create a backup copy of that file in advance.
  • Re-run your test
  • Search for the log file pymailmerge.log and provide that file.


  • Expand Details (click the black triangle left of Details)
  • Show the content of Details

Thanks for your reply.
I set

dbg = True

in and run my test again. I could not find the pymailmerge.log file, I tried with the find command but no luck.

Expanded the Details but it’s empty with columns Tasks and Status

Search for a file named pymailmerge.log

The log file should go to “work directory” - if you have doubts, try starting LibreOffice from terminal, and note the current directory when you start it.

Ah, you’re using a Linux. Then the debug output goes to terminal - you won’t have any logfile.

See lines 58 and below, which only set the file for “nt”.

Use terminal to start LibreOffice, as suggested, and watch the output there.

Thank you …
Here is the output from the terminal, in this renamed the mail server as and my email id as

    PyMailServiceProvider init
    PyMailServiceProvider create with <Enum instance ('SMTP')>
    PyMailSMTPService init
    python version is: 3.8.10 (default, Aug 16 2021, 22:31:21) 
    [GCC 7.3.1 20180303 (Red Hat 7.3.1-5)]
    PyMailSMTPService getSupportedConnectionTypes
    PyMailSMTPService connect
    Port: 587
    Timeout: <object object at 0x7f9b46d77de0>
    ConnectionType: Ssl
    send: 'ehlo []\r\n'
    reply: b'\r\n'
    reply: b'250-PIPELINING\r\n'
    reply: b'250-SIZE 73400320\r\n'
    reply: b'250-ETRN\r\n'
    reply: b'250-STARTTLS\r\n'
    reply: b'250-ENHANCEDSTATUSCODES\r\n'
    reply: b'250-8BITMIME\r\n'
    reply: b'250-DSN\r\n'
    reply: b'250 SMTPUTF8\r\n'
    send: 'STARTTLS\r\n'
    reply: b'220 2.0.0 Ready to start TLS\r\n'
    reply: retcode (220); Msg: b'2.0.0 Ready to start TLS'
    send: 'ehlo []\r\n'
    reply: b'\r\n'
    reply: b'250-PIPELINING\r\n'
    reply: b'250-SIZE 73400320\r\n'
    reply: b'250-ETRN\r\n'
    reply: b'250-AUTH PLAIN LOGIN\r\n'
    reply: b'250-AUTH=PLAIN LOGIN\r\n'
    reply: b'250-ENHANCEDSTATUSCODES\r\n'
    reply: b'250-8BITMIME\r\n'
    reply: b'250-DSN\r\n'
    reply: b'250 SMTPUTF8\r\n'
    Logging in, username of:
    send: 'AUTH PLAIN xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=\r\n'
    reply: b'235 2.7.0 Authentication successful\r\n'
    reply: retcode (235); Msg: b'2.7.0 Authentication successful'
    PyMailSMTPService isConnected

I am getting exactly the same issue here. Ubuntu 20.04LTS, same as you.

Version: / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 8; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: en-NZ (en_GB.UTF-8); UI: en-US
Ubuntu package version: 1:7.1.6~rc2-0ubuntu0.20.04.1~lo1
Calc: threaded

I have upgraded to 7.2.0 and the problem persists. This may be a configuration issue or related to ISP. I will try with a different email provider.

I have tried changing mail server, switching to a Windows platform, and upgrading to LO7.2. None of these fixed the issue.
A packet trace on the network showed connection, 220 herald form the mail server… and then nothing.
However, I then tried removing the first item in my merge address list… and it worked (though the progress bar was not updated until completion)
Why this should be, I’m not certain, particularly since I did not see anything sent on the network so it was not the server rejecting the recipient. The merge itself works fine as I can merge to a document with no issue. The problem was only when trying to send the merged document to this one mail address (and while short it is not a particularly unusual one).
I suggest the OP tries starting merge from entry #2 onwards and see if it magically works.

when I tried in windows platform with LO version 7.2 it simply crashing.

I may have found the cause. If you specify a range of documents – for example, 2 to 4 – then the first index is decremented by 1-- so you actually get documents 1 through 4 inclusive.
This means that, if you specify 1 - 10, it will try to send 11 documents starting with number 0, which does not exist, and so it hangs or crashes.
If I say to send all documents, or to send any range starting with 1, then I get the hang. If I gave a range from 2 to the maximum, then all are sent (including index 1). So this is a workaround, but the root cause seems to be an off-by-one error in the email sending loop.
Even so, I still get unexplained crashes happening, though it does seem to work some times.

This no longer works with LO Writer

I’m getting no error messages being sent to the terminal from which I started writer.

My current theory is that someone helpfully decided to close stderr. I’m continuing to debug.

This is on Ubuntu 22.04 and Python 2.7.18 in case that matters.

It’s becoming more and more apparent that no one seems to have tested this on Linux.

Please, at least tell what exactly you did. Had you enabled the debug output at all, as explained in Mail merge giving the message and hangs - #2 by anon73440385 ?

My test files haven’t changed.

I’ve got up in an emacs window. I set
dbg = TRUE and noted that for every OS but NT the
debug output is supposed to go to stderr.

On running my test again for records 2-4 I got the
same functional behavior, except that the program didn’t
freeze. The "Email merged document got closed, I could
close the status window, and I could rerun the test over
and over. Why would setting debug = TRUE prevent a lockup?
In my copious spare time, I’ll browse all “if(dbg) …”
instances to track this down.

First, I started LO from a terminal window and put it in
the background. Nothing from either stdout or stderr appeared
in the window. On the chance that LO checks whether it’s
been backgrounded and then closes stderr, I repeated with LO
in the foreground. Same results, no messages.

Really python2 ??

It’s what I found first time around. I spent a little
more effort and found a /usr/bin/python3 → python 3.10.

I’m semi-retired and when I code people pay me to
use either Fortran95 (aggressively compiled array language)
or C++ on my hacked up version of Clang/LLVM. It’s often
stuff other folks call from Python or MatLab.

It works fine in 6.4, but is broken in all 7.x releases. I’ve installed in parallel and all is good; though there are other issues in MSOffice compatilbility. So I have 6.4.7 installed AND 7.2 – I will normally use 7.2 but switch to 6.4 when I need mailmerge. This seems to work OK in Ubuntu.