document via email from libre office
Type “send email” into the search box of this site, read the plenty of answers to the same question and if you can’t find a solution, come back with at least a minimum of technical information and where you failed.
Install the Thunderbird email client, and set it: set your POP3 or IMAP mailbox. The LibreOffice will send the mails through the Thunderbird email client. It works for me from the Menu and by a macro. (You can control the sending by an user defined macro too.)
@Zizi64 (or someone), please give me an example of what you said (email from Calc to Thunderbird). I need to do a mass mailing of automatically generated emails according to a list of recipients.
I used to use Windows + MS Office (Outlook) for this purpose, but now I work on Linux + LO.
Install Thunderbird with your distro package manager. Configure it, mainly the mail accounts and the outbound mail server (SMTP). Note that this is becoming more and more difficult because mail providers try to lock you in their “ecosystem”, preferring you use their browser-based service with ads. The rough part is the authentication protocol which has subtle differences from one provider to another.
When this is done, go to Tools
>Options
, Internet
>Email
and tell LO where to find the email program.
Personally, I don’t recommend emailing directly from LO. You’ll be better off writing an email in Thunderbird and attaching the document to it. Make your recipient list a Thunderbird list and use the list name as the destination.
… unless you are using Windows, in which case, it is a matter of system configuration (registering the email client), and LibreOffice would not have own configuration for MUA.
(Ah, I see the question from @eeigor mentions Linux, so sorry for off-topic)
Nevertheless, I need an automatic mailing. Letters will be generated according to a template, including attachment of files (png - grafics; odt - a text document; .odp - a presentation file) and sent to recipients according to the mailing list. Anyway, I have a working application written by me, but the task is to get away from MS Office.
I use Linux.
The mailing list is generated dynamically and is contained in the source application that runs the mailing macro.
@eeigor then you are in a wrong topic, talking about what mail merge does, in a place where OP was asking about File
|Send
.
Regardless of the mention of macro in @Zizi64’s answer, you need to ask a separate question, and mention the relevant comment from there, to create wanted notifications as required.
Can you help me move the topic to the right place, or do I need to open a new topic?
Yes, I saw the answer.
“@Zizi64 (or someone), please give me an example of what you said (email from Calc to Thunderbird).”
In this way, you can also create letters with a body in HTML format.
eMessage.body="<html> <head></head> <body>" & _
"<p>Thanks to <b>@Zizi64</b> for the interesting" & _
"<a href=""https://forum.openoffice.org/en/forum/viewtopic.php?f=20&t=90100&hilit=%2Bmail#p425473""> link </a>." & _
"</p> </body> </html>"
Looking for a simple solution. Everything seems to be fine, except for one thing: emails are sent in a loop and there should be no popups. Silent mode.
My emails are sent in Silent mode.
Win 10, LO 7.3.1.3, Thunderbird 91.7.0
HTML would work for me too, since it’s not hard to put together a string.
This is important. The NO_USER_INTERFACE flag is only used on Windows currently (see shell/source/win32/simplemail/smplmailclient.cxx in the search results, where is the only case of checking the flag) - so on other platforms, it’s entirely up to the mailer settings configured externally.
Please consider mail merge. It is created specifically for the task that you describe. And it is implemented using a different mechanism on OSes other than Windows (IIRC), using a python script managing SMTP directly, so not depending on your mailer.
@mikekaganski: So, can I embed a Python script in a Calc document just for this task and use BASIC for the rest?
I might had been unclear here. You are not required to use Python yourself; you only need to use the referenced service in whatever language you prefer. I only mentioned Python as some internal implementation detail, trying to emphasize the difference between use of com.sun.star.system.SimpleSystemMail
(implemented using invocations of a MUA configured at Tools
|Options
|Internet
|Email
) vs com.sun.star.text.MailMerge
(that is independent from the MUA, using Python’s in-built SMTP methods). But note that mail merge is a function built into Writer, and it only uses data from data sources (which may be a Calc sheet, too); note also that the SMTP settings for it are configured at Options
|Writer
|Mail Merge Email
.
Colleagues, thank you very much for the useful discussions!