Bug 138398 - MAILMERGE: nothing append when sending range emails (no problem with mailing all or printing)
Summary: MAILMERGE: nothing append when sending range emails (no problem with mailing ...
Status: RESOLVED WORKSFORME
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-11-21 21:25 UTC by Thierry Munoz
Modified: 2022-05-18 07:57 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
The box hanging (16.96 KB, image/png)
2020-11-21 21:26 UTC, Thierry Munoz
Details
Box hanging with details (17.21 KB, image/png)
2020-11-21 21:29 UTC, Thierry Munoz
Details
The email application in LibreOffice Writer e-mailing option (57.07 KB, image/png)
2020-11-21 22:05 UTC, Thierry Munoz
Details
Connection test OK with smtp account (21.35 KB, image/png)
2020-11-21 22:07 UTC, Thierry Munoz
Details
Problem when choosing a range of emails. (44.22 KB, image/png)
2020-11-22 18:29 UTC, Thierry Munoz
Details
The email settings for Writer (118.69 KB, image/png)
2022-05-17 15:12 UTC, Thierry Munoz
Details
The authentification settings (43.93 KB, image/png)
2022-05-17 15:19 UTC, Thierry Munoz
Details
Database not updating for email mailmerge (250.54 KB, image/png)
2022-05-17 16:01 UTC, Thierry Munoz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thierry Munoz 2020-11-21 21:25:31 UTC
Description:
I use an odt file and a database based on calc for mailing on Ubuntu 18.04.
No problem for printing the results but when I want send the emails nothing append. The sending hangs.
I've verified the Internet Options and all seems good. I can send the .odt by email so this configuration is OK.

Same problem under 6.4.2 rc2, 6.4.7 and 7.0.3.1.

Steps to Reproduce:
1. Prepare an .odt document with fields coming from a calc file. I use conditionnal fields.
2. Clic on the icon for mailmerge
3. I select one recording in order to test.
4. Writer generates all the records but it's not necessary.
5. An info box appears to show the evolution of the sending but nothing append, no details, the bar progress stays at the beginning.

Actual Results:
Nothing appends. No sending with the info box always displayed and doesn't changing, it's hanging.


Expected Results:
The emails should be sent.


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
Version: 7.0.3.1
Build ID: 00(Build:1)
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); Langue IHM : fr-FR
Ubuntu package version: 1:7.0.3-0ubuntu0.18.04.1
Calc: threaded
Comment 1 Thierry Munoz 2020-11-21 21:26:15 UTC
Created attachment 167459 [details]
The box hanging
Comment 2 Thierry Munoz 2020-11-21 21:29:21 UTC
Created attachment 167460 [details]
Box hanging with details
Comment 3 Thierry Munoz 2020-11-21 22:05:02 UTC
Created attachment 167461 [details]
The email application in LibreOffice Writer e-mailing option

The path to Thunderbird, working in command line.
Comment 4 Thierry Munoz 2020-11-21 22:07:35 UTC
Created attachment 167462 [details]
Connection test OK with smtp account

Connection test is OK with the smtp account in the Internet options.
Comment 5 Thierry Munoz 2020-11-21 22:27:26 UTC
This problem occurs only when you select a range of email.
If we send all the documents by email, there's no problem.
Comment 6 [REDACTED] 2020-11-22 17:17:57 UTC
(In reply to Thierry Munoz from comment #0)


> I've verified the Internet Options and all seems good. I can send the .odt
> by email so this configuration is OK.

You are aware that "Mail Merge" functionality goes directly via SMTP server and you need to prepare settings in Tools -> Options -> LibreOffice Writer -> Mail Merge Email. The default email client is *not* involved in "Mail Merge"
Comment 7 Thierry Munoz 2020-11-22 18:29:53 UTC
Created attachment 167482 [details]
Problem when choosing a range of emails.

The problem is not with the parameters because it's possible to send all the mails but when you choose a range of emails, that's not working.
Comment 8 Tonio Tanzi 2022-02-23 12:07:39 UTC
Same problem in the same conditions in LO 7.3.0.3 (Linux Neon - KDE Plasma 5.24), but also with "send all".

I use mail merge to send via email in pdf format.

No problem with previous LO versions.
Comment 9 justforthis7 2022-03-26 22:09:05 UTC
Same problem here
Version: 7.3.1.3 / LibreOffice Community
Build ID: 30(Build:3)
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-GB
Ubuntu package version: 1:7.3.1~rc3-0ubuntu0.20.04.1~lo1
Calc: threaded

I am using a new base file (firebird embedded)as data source
Mail merge is working for printing/ saving/edit individual docs etc
 
The connection test seems to work
Using Gmail - have checked that access for less secure apps is turned on. 
(Initially it wasn't - had turned itself off AGAIN - although google are not going to allow access for less secure apps from end of May this year - so a fix for this is needed too)

Send all - info box flashed up (too quick to see) but nothing was sent.
Now doing a single test (to my email) and it is hanging as described.
Have tried both sending as html (my preferred option) and as a.odt attachment (no point me trying to send as a pdf as need recipients to be able to edit easily) 
Luckily this is just 30 ish emails so can do it manually. But does seem to be a bug.
Comment 10 Timur 2022-04-11 17:02:52 UTC
There is a chance this may be fixed with recent commits. 
If someone can test with daily master, that would be nice. 
Otherwise, please install LO 7.3.3 once when it's ready.
Comment 11 Timur 2022-04-28 12:33:19 UTC
(In reply to Thierry Munoz from comment #0)
> 5. An info box appears to show the evolution of the sending but nothing
> append, no details, the bar progress stays at the beginning.

(In reply to justforthis7 from comment #9)
> Same problem here
> Send all - info box flashed up (too quick to see) but nothing was sent.

These are not the same problems. 
When there are no problems and mail is sent, info box doesn't stay open.
New fix is that info box stays open if there were problems.

I change to Needinfo, as there were fixes and I cannot reproduce.
Please fetch LO 7.3.3 from https://www.libreoffice.org/download/download/ and test again (it's prerelease but OK).
Comment 12 Thierry Munoz 2022-05-17 14:18:50 UTC
Hi,

Now it's impossible to send email with mailmerge with LO 7.1, 7.2 and 7.3.3.2_Linux_x86-64 under Ubuntu 20.04.
The same thing happens under LO 7.3.3 under Windows 10 -> LO freeze.

Under Ubuntu, I have this message error (whatever the LO versions, here is with 7.1 but I've the same with 7.2 ou 7.3 and a python-core version higher) :

<class 'smtplib.SMTPRecipientsRefused'>: {'ce.0110069r@ac-montpellier.fr': (454, b'4.7.1 <ce.0110069r@ac-montpellier.fr>: Relay access denied')}, traceback follows
  File "/opt/libreoffice7.1/program/mailmerge.py", line 273, in sendMailMessage
    self.server.sendmail(sendermail, truerecipients, msg.as_string())
  File "/opt/libreoffice7.1/program/python-core-3.8.8/lib/smtplib.py", line 883, in sendmail
    raise SMTPRecipientsRefused(senderrs)


I've tested the SMTP server via the LO options menu and it seems working (no error message).
The email mailmerge function is not usable since several versions and it's worse.
So to avoid this problem, I have to send emails with Thunderbird (same SMTP server) and the add-ons "Mailmerge" https://addons.thunderbird.net/fr/thunderbird/addon/mail-merge/.

No problem with letter mailmerge.

Regards
Comment 13 Timur 2022-05-17 14:27:26 UTC
Mike, please see. Doesn't seem like bug to me. Relay is a mail server problem.
Comment 14 Mike Kaganski 2022-05-17 15:07:29 UTC
(In reply to Timur from comment #13)

The "454 4.7.1 Relay access denied" is a response from Postfix, and likely means that the authentication is not established properly. I would suspect that while the SMTP server is set up properly, possibly it requires a "login-before-send"; possibly it allows to connect without pre-auth, (which would be why testing succeeds) but rejects sending?

Thierry Munoz: please check Server Authentication on Options->Writer->Mail Merge Email.
Comment 15 Thierry Munoz 2022-05-17 15:11:43 UTC
As I described before the settings seems good (see attachments).
Comment 16 Thierry Munoz 2022-05-17 15:12:34 UTC
Created attachment 180165 [details]
The email settings for Writer
Comment 17 Mike Kaganski 2022-05-17 15:15:00 UTC
(In reply to Thierry Munoz from comment #15)
> As I described before the settings seems good (see attachments).

The attachments don't show anything wrt the server authentication I mentioned above; attachment 167461 [details] is completely unrelated to Mail Merge (it is only used for File->Send). Attachment 167462 [details] may show what I explained: "possibly it allows to connect without pre-auth, (which would be why testing succeeds) but rejects sending?".

So please do answer the questions that are asked to allow finding the problem, instead of rejecting those as unrelated. Thanks.
Comment 18 Mike Kaganski 2022-05-17 15:15:45 UTC
(In reply to Thierry Munoz from comment #16)
> Created attachment 180165 [details]
> The email settings for Writer

Aha, this shows the relevant page - but does not show anything about server authentication, still.
Comment 19 Thierry Munoz 2022-05-17 15:19:37 UTC
Created attachment 180166 [details]
The authentification settings

If I check the field and use the right settings (1st or 2nd options), I have an error when I check the connection.
Comment 20 Thierry Munoz 2022-05-17 15:28:47 UTC
Don't take my today messages in account : the password was wrong.
Sorry for this time loss because a beginning user error.

I'll retest to verify the bug evolution.
Comment 21 Thierry Munoz 2022-05-17 16:01:12 UTC
Created attachment 180167 [details]
Database not updating for email mailmerge

The email are sent with my password mistake corrected : so no problem with the email mailmerge on this side.

But when I switch database source, there's a difference beetween the new source (4 records) and the number of records proposed by the email mailmerge dialog (63 records) that is the old database.
Comment 22 Mike Kaganski 2022-05-17 16:08:25 UTC
(In reply to Thierry Munoz from comment #21)
> The email are sent with my password mistake corrected : so no problem with
> the email mailmerge on this side.

Good; so comment 12 may be considered resolved.

Now what about comment 0? Does sending succeed normally?

> But when I switch database source

Please let us focus on the original problem. When the description in comment 0 starts working, the issue is resolved (is it?). Any other problem needs a separate issue, with own resolution. (Please do not forget to describe the exact steps you do to change database, and attach a sample with a ODT and two ODBs to repro in the new bug report).
Comment 23 Timur 2022-05-17 16:50:47 UTC
Original problem seems resolved.
 For additional problem please make tests and search in all bugs, opem and closed, and report of not found.
Comment 24 Thierry Munoz 2022-05-17 17:28:54 UTC
I haven't tested if it was resolved : no test database available now for testing.
Comment 25 Timur 2022-05-18 07:57:03 UTC
I closed because I tested this and all is working, closed multiple bugs. 
Still, if reproduced, please explain.