Bug 153277 - Mail Merge: UnicodeEncodeError for Domains with Umlaut
Summary: Mail Merge: UnicodeEncodeError for Domains with Umlaut
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Mail-Merge
  Show dependency treegraph
 
Reported: 2023-01-30 10:27 UTC by Axel Braun
Modified: 2025-02-04 14:24 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 Axel Braun 2023-01-30 10:27:02 UTC
Umlauts in Domains (like Düsseldorf instead of Duesseldorf) are permited since a couple of years.
When sending a mail to one of those domains using mailmerge, LO dumps:

<class 'UnicodeEncodeError'>: 'ascii' codec can't encode character '\xfc' in position 20: ordinal not in range(128), traceback follows
  File "/usr/lib64/libreoffice/program/mailmerge.py", line 262, in sendMailMessage
    self.server.sendmail(sendermail, truerecipients, msg.as_string())
  File "/usr/lib64/python3.10/smtplib.py", line 892, in sendmail
    (code, resp) = self.rcpt(each, rcpt_options)
  File "/usr/lib64/python3.10/smtplib.py", line 553, in rcpt
    self.putcmd("rcpt", "TO:%s%s" % (quoteaddr(recip), optionlist))
  File "/usr/lib64/python3.10/smtplib.py", line 378, in putcmd
    self.send(f'{s}{CRLF}')
  File "/usr/lib64/python3.10/smtplib.py", line 357, in send
    s = s.encode(self.command_encoding)
Comment 1 Stéphane Guillou (stragu) 2023-02-01 13:39:00 UTC
Thank you, Axel.

I can reproduce with:

Version: 7.4.5.1 / LibreOffice Community
Build ID: 9c0871452b3918c1019dde9bfac75448afc4b57f
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

I also get the "Emails could not be sent" error dialog with:

<class 'UnicodeEncodeError'>: 'ascii' codec can't encode character '\xfc' in position 22: ordinal not in range(128), traceback follows
  File "/opt/libreoffice7.4/program/mailmerge.py", line 262, in sendMailMessage
    self.server.sendmail(sendermail, truerecipients, msg.as_string())
  File "/opt/libreoffice7.4/program/python-core-3.8.16/lib/smtplib.py", line 890, in sendmail
    (code, resp) = self.rcpt(each, rcpt_options)
  File "/opt/libreoffice7.4/program/python-core-3.8.16/lib/smtplib.py", line 551, in rcpt
    self.putcmd("rcpt", "TO:%s%s" % (quoteaddr(recip), optionlist))
  File "/opt/libreoffice7.4/program/python-core-3.8.16/lib/smtplib.py", line 376, in putcmd
    self.send(f'{s}{CRLF}')
  File "/opt/libreoffice7.4/program/python-core-3.8.16/lib/smtplib.py", line 355, in send
    s = s.encode(self.command_encoding)

Example of host allowing umlauts in domain names: https://www.ionos.com/help/domains/glossary-important-terms-and-topics-explained/umlaut-domains/
Comment 2 QA Administrators 2025-02-01 03:12:20 UTC Comment hidden (obsolete)
Comment 3 Axel Braun 2025-02-04 11:08:57 UTC
Currently using
Version: 24.8.4.2 (X86_64) / LibreOffice Community
Build ID: 480(Build:2)
CPU threads: 12; OS: Linux 6.13; UI render: default; VCL: kf6 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded

and sending mails seems not to work at all:
connection to SMTP-Server established
0 of 0 mails sent

note that with the same settings I can print the mailmerge properly
Comment 4 Axel Braun 2025-02-04 14:24:42 UTC
(In reply to Axel Braun from comment #3)

> and sending mails seems not to work at all:
> connection to SMTP-Server established
> 0 of 0 mails sent
> 
> note that with the same settings I can print the mailmerge properly

created https://bugs.documentfoundation.org/show_bug.cgi?id=165039 for the issue