Description: When sending email in a macro using sendSimpleMailMessage your bodytext can only have one row. If you have multiple rows divided with chr$(10) (new line) all rows ends up as additional recipents. LibreOffice 4.4.3.2 Base on Linux Mint 17.2 Mate 1.10.2 have not this problem. LibreOffice 5.1.6.2 Base on Linux Mint 18.3 Mate 1.18.0 have not this problem. LibreOffice 5.4.7.2 Base on Linux Mint 19.3 Cinnamon 4.4.8 have this problem. LibreOffice 6.0.7.3 Base on Linux Mint 19.3 Cinnamon 4.4.8 have this problem. Code: eMailer = createUnoService("com.sun.star.system.SimpleCommandMail") eMessage = eMailer.createSimpleMailMessage() eMessage.Recipient = eMailAdress eMessage.Subject=eSubject eMessage.Body=bodytext eMessage.Attachement=(Array(convertToUrl(filepath))) eMailer.sendSimpleMailMessage ( eMessage, _ com.sun.star.system.SimpleMailClientFlags.NO_USER_INTERFACE ) System: LO version 6.0.7.3 CPU threads: 8, OS: Linux 5.4, UI render: default, VCL: gtk3 Locale: sv-SE (en_US.UTF-8) Linux Mint 19.3 Cinnamon 4.4.8 Steps to Reproduce: 1.Run the code above 2. 3. Actual Results: The mail client (tested thunderbird and evolution) opens up. If there is a chr$10 (new line) in the bodytext no rows are put into the bodytextfield. In the recipients field the original recipient is inserted and one recipient for every bodytext-row. Expected Results: Only one recipient and all rows of the bodytext in the bodytext field. Reproducible: Always User Profile Reset: No OpenGL enabled: Yes Additional Info: -
On pc Debian x86-64 with master sources updated today, I don't reproduce this. I gave a try with: Sub Main eMailer = createUnoService("com.sun.star.system.SimpleCommandMail") eMessage = eMailer.createSimpleMailMessage() eMessage.Recipient = "test@test.fr" eMessage.Subject="subject" eMessage.Body="body1" + chr$(10) + "body2" + chr$(10) + "body3" eMessage.Attachement=(Array(convertToUrl(filepath))) eMailer.sendSimpleMailMessage ( eMessage, _ com.sun.star.system.SimpleMailClientFlags.NO_USER_INTERFACE ) End Sub 6.0 is an old branch. Could you give a try to last stable LO version 6.4.5?
Created attachment 164153 [details] Screenshot of output
Thank you for your feedback. Could you also attach the precise macro code you used?
The screenshot was with LO 6.4.5 code: sub send_email(filepath as String, eMailAdress as String, yourOrderno as String) Dim eSubject as String Dim eMailer as Object Dim eMailClient as Object Dim eMessage as Object eSubject = "Delivery note your order " & yourOrderno eMailer = createUnoService("com.sun.star.system.SimpleCommandMail") eMessage = eMailer.createSimpleMailMessage() eMessage.Recipient = eMailAdress eMessage.Subject=eSubject eMessage.Body="Text1" & chr$(10) & "Text2" & chr$(10) & "Text3" eMessage.Attachement=(Array(convertToUrl(filepath))) eMailer.sendSimpleMailMessage ( eMessage, _ com.sun.star.system.SimpleMailClientFlags.NO_USER_INTERFACE ) End sub
I still don't reproduce the problem with your code (after having args of the function since LO complains I call the macro without args). It seems I can't help here => uncc myself. Since I don't have more questions, I'll put it back to UNCONFIRMED.
LO 5.1.6.2 seems to be the last version working. LO 5.2.7.2 and onwards has this issue.
Tested with claws-mail instead of thunderbird and that was working with LO 6.4.5. The issue seems to be between thunderbird and LO from version 5.2.7.2 and onwards.
Hello Zeke, A new major release of LibreOffice is available since this bug was reported. Could you please try to reproduce it with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ? I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version.
New test with LO7. New clean install of Linux Mint 20.1 Cinnamon. sudo add-apt-repository ppa:libreoffice/ppa Upgrade LO to latest fresh. Assign an account to Thunderbird and test it so it can send email. Run this code: sub send_email(filepath as String, eMailAdress as String, yourOrderno as String) Dim eSubject as String Dim eMailer as Object Dim eMailClient as Object Dim eMessage as Object Dim bodytxtstring as string eSubject = "Delivery note your order " & yourOrderno bodytxtstring="Please find delivery note attached" & chr$(10) & "as pdf." & chr$(10) & "Best Regards ..." eMailer = createUnoService("com.sun.star.system.SimpleCommandMail") eMessage = eMailer.createSimpleMailMessage() eMessage.Recipient = eMailAdress eMessage.Subject=eSubject eMessage.Body=bodytxtstring eMessage.Attachement=(Array(convertToUrl(filepath))) eMailer.sendSimpleMailMessage ( eMessage, _ com.sun.star.system.SimpleMailClientFlags.NO_USER_INTERFACE ) end sub Result in Thunderbird: From: zxc@gmail.com To: vbn@gmail.com To: Please find delivery note attached To: as pdf. To: Best Regards ... Subject: Delivery note your order 254456 Bodytext: (Nothing) The bug seems to still be present in LO7. Due to the bug we use the following code instead: eSubject = "Delivery note " & deliveryID & " from your order no " & yourOrderno shellstring="thunderbird -compose subject=" & eSubject & ",to=" & eMailAdress & ",message=/home/user1/Businessystem/txt/Deliveryconftxt,attachment='" & filepath & "'" shell shellstring
I am also having this EXACT problem with Libreoffice + Linux Mint + Thunderbird setting. But it works well with evolution or Geary email client. BTW Zeke, can you elaborate on your workaround code ? -------------------- Due to the bug we use the following code instead: eSubject = "Delivery note " & deliveryID & " from your order no " & yourOrderno shellstring="thunderbird -compose subject=" & eSubject & ",to=" & eMailAdress & ",message=/home/user1/Businessystem/txt/Deliveryconftxt,attachment='" & filepath & "'" shell shellstring --------------------- what exactly is this shellstring stuff ?
Explanation of the workaround we use as requested by Pharmankur: eSubject = "Delivery note " & deliveryID & " from your order no " & yourOrderno shellstring="thunderbird -compose subject=" & eSubject & ",to=" & eMailAdress & ",message=/home/user1/Businessystem/txt/Deliveryconftxt,attachment='" & filepath & "'" shell shellstring Shell execute a command at the cl (commandline) Shellstring is a textstring with the command. thunderbird starts thunderbird. -compose tells thunderbird to initiate a mail to send. subject= sets the mails subject. to= sets the mails reciepent. message= path to a textfil containing the bodytext of the mail. attachment= path to a attachment file.
Thank You Zeke for your quick response That's a great workaround. Thanks for sharing.
Dear Zeke, Based on your idea (of using shell script from libreoffice Macro) prepared a demo file. It makes use of MUTT Details are here --- https://forum.openoffice.org/en/forum/viewtopic.php?f=20&t=90100#p521622
You will always need one recipient in the 'TO' field so in order for the mass email to get sent, simply type your own email address there. This will show them that you care about their privacy and they'll be grateful for your thoughtful actions.
You will always need one recipient in the 'TO' field so in order for the mass email to get sent, simply type your own email address there. https://routerlogin.ltd/ https://pikashow.ltd/
Ensure your mass email gets sent by entering your own email address as the recipient in the 'TO' field. https://spotsungs.com/spotify-premium-apk-2/
Is it legal to download your own Instagram Reels? check full faq from here: https://storiessaver.org/reels/
Setting to new as per comment 10. Version and regression keywords as per comment 6.
Is this the same issue as https://bugzilla.mozilla.org/show_bug.cgi?id=208230 ? Which would make it "not our bug"?
Pikashow apk provides online streaming of content, including shows and cricket, to attract multiple users for free. Pikashow for PC contains extraordinary content which is available in web stories, live TV channels, TV shows, sports, and cricket categories for PC/Desktop (Windows/Macbook/Linux) users.
The prominent benefit of using [Pikashow](pikashowpc.com) on Windows and Macbooks is its high-density streaming feature, as it provides high-quality watching content. For Mac users, the app provides a maximum of 4K quality options, which is incredible and focuses on showing content perfectly.
You must always have one recipient in the 'TO' field for the mass email to be sent. To accomplish this, just enter your own email address in that field.