Subject: Re: bug#75628: 31.0.50; Error sending mail using SMTP - base64 encoding fails

From: Eli Zaretskii <[email-masked]>
Date: Fri, 17 Jan 2025 15:36:59 +0200

> Cc: Ingo Brunberg <[email-masked]>
> From: Robert Pluim <[email-masked]>
> Date: Fri, 17 Jan 2025 14:15:26 +0100
> 
>     Ingo> With a simple password some time ago, I could send mail.
> 
> Does this fix it? I guess at least "AUTH LOGIN" needs similar
> treatment, and probably "AUTH CRAM-MD5". I donʼt think XOAUTH2 needs
> it, but Iʼll check.

If this is the fix, then how do you explain what the OP says, that
"some time ago" he could do this without problems?  Do you assume that
the "simple password" was plain-ASCII or something?

The OP didn't show the data collected by report-emacs-bug, so we don't
know the locale's encoding in his case.  That could perhaps explain
the difference in behavior.

Also, smtpmail-command-or-throw calls process-send-string, which
should already encode the command.  So the call to
encode-coding-string is almost certainly incorrect; if anything, we
should bind coding-system-for-write to 'utf-8'.  (Btw, how do we know
UTF-8 is the right encoding in this case? is that in some relevant
RFC?)

Thanks.