Bug 116234 - If you enter email settings during the mailing process, the sending will fail
Summary: If you enter email settings during the mailing process, the sending will fail
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.1.0.3 release
Hardware: All All
: medium normal
Assignee: Michael Weghorn
URL:
Whiteboard: target:6.4.0 target:6.3.3
Keywords:
Depends on:
Blocks: Mail-Merge
  Show dependency treegraph
 
Reported: 2018-03-06 12:49 UTC by Buovjaga
Modified: 2019-10-02 11:11 UTC (History)
3 users (show)

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 Buovjaga 2018-03-06 12:49:13 UTC
I ran into this while testing a bug and found this: https://ask.libreoffice.org/en/question/88245/e-mailing-connection-ok-server-ok-no-mail-sent/?answer=88352#post-id-88352

"You need to set the outgoing server parameters in the menu Tools → Options → LibreOffice Writer → Mailing Email

If the parameters are set during the Mailing procedure in Writer, the parameter tests Connection & Server are OK but the mailing fails with the message "please run connect() first"!"

So this means the settings entered after trying to email and getting this dialog:
"In order to be able to send mail merge documents by e-mail, LibreOfficeDev requires information about the e-mail account to be used.

Do you want to enter e-mail account information now?"

Here is the whole error:

<class 'smtplib.SMTPServerDisconnected'>: please run connect() first, traceback follows
  File "/home/user/libreoffice/instdir/program/mailmerge.py", line 288, in sendMailMessage
    self.server.sendmail(sendermail, truerecipients, msg.as_string())
  File "/usr/lib/python3.6/smtplib.py", line 852, in sendmail
    self.ehlo_or_helo_if_needed()
  File "/usr/lib/python3.6/smtplib.py", line 600, in ehlo_or_helo_if_needed
    if not (200 <= self.ehlo()[0] <= 299):
  File "/usr/lib/python3.6/smtplib.py", line 440, in ehlo
    self.putcmd(self.ehlo_msg, name or self.local_hostname)
  File "/usr/lib/python3.6/smtplib.py", line 367, in putcmd
    self.send(str)
  File "/usr/lib/python3.6/smtplib.py", line 359, in send
    raise SMTPServerDisconnected('please run connect() first')

Arch Linux 64-bit
Version: 6.1.0.0.alpha0+
Build ID: 13164cc99dc6184fb2c12e56e9c0dea0d5692eec
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on March 4th 2018
Comment 1 Xisco Faulí 2018-03-06 15:00:06 UTC
Confirmed in

Version: 6.1.0.0.alpha0+
Build ID: 2affed9bfd72628549df3049ed9f6e6a30fdb5b8
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 2 Dominique Meeùs 2018-04-19 07:17:08 UTC
Even if you set the outgoing server parameters in the menu Tools → Options → LibreOffice Writer → Mailing Email, the mailing keeps asking the parameters of the SMTP server during the mailing procedure and fails as described.
One has to quit LibreOffice and reopen the document. I did and the mailing succeeded.
Comment 3 Dominique Meeùs 2018-04-19 07:18:39 UTC
(In reply to Dominique Meeùs from comment #2)
> Even if you set the outgoing server parameters in the menu Tools → Options →
> LibreOffice Writer → Mailing Email, the mailing keeps asking the parameters
> of the SMTP server during the mailing procedure and fails as described.
> One has to quit LibreOffice and reopen the document. I did and the mailing
> succeeded.

Forgot to add: Version: 6.0.3.2
Build ID: 1:6.0.3-0ubuntu1
Threads CPU : 4; OS : Linux 4.15; UI Render : par défaut; VCL: gtk3; 
Locale : fr-BE (fr_BE.UTF-8); Calc: group
Comment 4 QA Administrators 2019-04-20 02:57:58 UTC Comment hidden (obsolete)
Comment 5 Michael Weghorn 2019-09-25 16:26:55 UTC
Still reproducible with

Version: 6.4.0.0.alpha0+
Build ID: 7fe64353dc9950e19182a59a486a1ecac27cf98e
CPU threads: 64; OS: Linux 4.9; UI render: default; VCL: kf5; 
Locale: en-GB (en_GB.UTF-8); UI-Language: en-US
Calc: threaded

I've analysed this a bit and plan to submit a patch sometime soon (maybe next week).
Comment 6 Michael Weghorn 2019-09-30 11:10:15 UTC
Patch in Gerrit: https://gerrit.libreoffice.org/#/c/79847/
Comment 7 Commit Notification 2019-10-01 05:46:05 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a1573b2e2fda77b7b7d605fe36f5a28f86a3e91b

tdf#116234 Apply email settings just set

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Michael Weghorn 2019-10-01 05:46:44 UTC
Fixed on master; backport for 6.3: https://gerrit.libreoffice.org/#/c/79907/
Comment 9 Commit Notification 2019-10-01 09:00:35 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/commit/06831200607932a787430d6ea2c6860b26e4f3e1

tdf#116234 Apply email settings just set

It will be available in 6.3.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Buovjaga 2019-10-02 11:11:48 UTC
Thanks a lot, I was able to enter email settings during the process and the mail went through!

Arch Linux 64-bit
Version: 6.4.0.0.alpha0+
Build ID: cb5eaa791739865d54b381c16c60224c432171dc
CPU threads: 8; OS: Linux 5.3; UI render: default; VCL: kf5; 
Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US
Calc: threaded
Built on 2 October 2019