Bug 149703 - MAILMERGE Feature Request: Save the last configuration of the “Send Email Messages” Mail Merge dialog
Summary: MAILMERGE Feature Request: Save the last configuration of the “Send Email Mes...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.3.4.2 release
Hardware: All All
: low enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Mail-Merge
  Show dependency treegraph
 
Reported: 2022-06-23 18:38 UTC by mworks
Modified: 2023-06-05 08:46 UTC (History)
0 users

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 mworks 2022-06-23 18:38:47 UTC
Description:
When using Mail Merge to send personalized emails, the final dialog asks us to:

- Select the column of the data source containing the email addresses,
- Enter email addresses that should receive a copy (Cc, Bcc)
- Type the subject of the email
- Select the rows of the data source that will be processed (all rows, or a specific range)

Currently, the user has to enter these details every time he clicks on the “Send Email Messages” button and this is very impractical. In practice, Mail Merge documents are templates that are reused periodically as the data source is updated (records are added to the database, or in certain workflows that are very common a different file is generated daily containing the records to be emailed for the day). Having to retype all the configuration every time impedes productivity in addition to being error prone.

LibreOffice should instead remember the last configuration inserted by the user and store it as metadata in the .odt file directly. This would be a massive quality of life improvement for users.

Also, it would be very useful if this dialog could also allow the user to optionally override the identity of the sender (Name, email address, reply-to) so that every document contains the whole Mail Merge configuration and is self-contained. Currently the identity of the Sender can only be defined in LibreOffice’s global options (Options → LibreOffice Writer → Email Mail Merge).

This makes it difficult not only to share the configuration between team members, but also to work on different documents that should show a different sender identity. For currently, for every document one needs to get into the options, modify the sender identity and restart LibreOffice to ensure that the changes are picked up. This is both tedious and error prone as one can easily forget to do so (especially since the Send Email Messages dialog does not remind us the current Sender Identity).

This configuration should be able to be set on a per document basis as well (in addition to the global option). For all these reasons I believe the proposed mechanism would be a simple and elegant way to implement this.

Steps to Reproduce:
1.Create a document
2.Setup email mail merge for example from a Calc spreadsheet
3.Click the "Send Email Messages" button of the MailMerge toolbar and proceed to sending the emails using the dialog

Actual Results:
Emails are sent but the configuration entered in the "Send Email Messages" dialog is lost and must be entered every time one wants to send emails

Expected Results:
The configuration entered in the "Send Email Messages" dialog should be stored as metadata in the .odt document itself and the dialog should be automatically populated with the last configuration used. Moreover, the dialog should allow users to override the global Sender Identity on a per document basis (and store this configuration as well in the .odt document to restore it automatically along with the other configuration).


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.3.4.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 4; OS: Linux 5.18; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fr-FR (fr_FR.UTF-8); UI: en-US
Calc: threaded
Comment 1 Mike Kaganski 2022-06-24 06:48:16 UTC
Please note that, despite I have fixed a couple of MM-related bugs, I myself am not a power MM user, so I don't quite know all the details how that was intended to work.

That said, however, I see that there *looks* to already be the necessary provision for this functionality. The code (SwMMResultEmailDialog::FillInEmailSettings, [1]) already assigns specific data source field to mail merge email field. I am unsure where this information is set up (I think it is "Address Book Source", that defines 31 fields, of which the MM uses only 14 from MM_PART_TITLE to MM_PART_GENDER [2]), and the SwMailMergeConfigItem_Impl::ImplCommit [3] knows about 39 fields.

So first of all, we need to understand the existing functionality, to avoid duplicate features.

[1] https://opengrok.libreoffice.org/xref/core/sw/source/ui/dbui/mmresultdialogs.cxx?r=123d3a93&mo=13975&fi=395#395
[2] https://opengrok.libreoffice.org/xref/core/sw/inc/dbui.hrc?r=14cfff50#30
[3] https://opengrok.libreoffice.org/xref/core/sw/source/uibase/dbui/mmconfigitem.cxx?r=ca734f7c&mo=20152&fi=469#469
Comment 2 mworks 2022-06-24 13:39:04 UTC
(In reply to Mike Kaganski from comment #1)
> Please note that, despite I have fixed a couple of MM-related bugs, I myself
> am not a power MM user, so I don't quite know all the details how that was
> intended to work.
> 
> That said, however, I see that there *looks* to already be the necessary
> provision for this functionality. The code
> (SwMMResultEmailDialog::FillInEmailSettings, [1]) already assigns specific
> data source field to mail merge email field. I am unsure where this
> information is set up (I think it is "Address Book Source", that defines 31
> fields, of which the MM uses only 14 from MM_PART_TITLE to MM_PART_GENDER
> [2]), and the SwMailMergeConfigItem_Impl::ImplCommit [3] knows about 39
> fields.
> 
> So first of all, we need to understand the existing functionality, to avoid
> duplicate features.
> 
> [1]
> https://opengrok.libreoffice.org/xref/core/sw/source/ui/dbui/mmresultdialogs.
> cxx?r=123d3a93&mo=13975&fi=395#395
> [2] https://opengrok.libreoffice.org/xref/core/sw/inc/dbui.hrc?r=14cfff50#30
> [3]
> https://opengrok.libreoffice.org/xref/core/sw/source/uibase/dbui/
> mmconfigitem.cxx?r=ca734f7c&mo=20152&fi=469#469

No worries thanks for your help! At the very least it is great not feeling alone in this kind of situation. Could you please give me a link that would tell me the fastest way to get a development environment running for LibreOffice? While I am by no mean a C++ wizard, I may have no choice but to become one fairly rapidly... To make a long story short I sort of bet the farm on the fact that I would be able to use LibreOffice's Mail Merge as i assumed it was an old feature that would be stable and battle-tested by now.
Comment 3 Timur 2022-07-08 13:59:09 UTC
(In reply to mworks from comment #2)
> No worries thanks for your help! At the very least it is great not feeling
> alone in this kind of situation. Could you please give me a link that would
> tell me the fastest way to get a development environment running for
> LibreOffice? While I am by no mean a C++ wizard, I may have no choice but to
> become one fairly rapidly...
https://wiki.documentfoundation.org/Development/BuildingOnLinux
https://dev.blog.documentfoundation.org/2021/10/04/getting-started-video-tutorial/

I'll set to New so far.