Writer Mailmerge to email fails to send if sending from index 1

When doing a mailmerge send to email, the merge is done, then Writer attempts to send to email. The progress box showing “0 of x messages” appears - and then hangs. No messages are sent.

A tcpdump of the network traffic shows that a connection is made to the mail server, the herald received, but after that nothing is sent until the connection times out.

Changing to a different mail server, to a different (7.1 or 7.2) version of Libreoffice, or changing platform (Ubuntu or Windows) does not make a difference.

If I provide the application with a database of 10 addresses, then the merge-to-email given me two options - merge all, or specifying a range (by default, 1 - 10). If I specify a range with the first number larger than 1, it works. The progress window also states “x of y done” where y is one larger than would be expected.

So, I may have found the cause. If you specify a range of documents – for example, 2 to 4 – then the first index is apparently 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 offset number 0, which does not exist, and so the system hangs. 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.