unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* smtpmail support of unicode passwords
@ 2014-04-13 18:27 Garreau, Alexandre
  2014-04-13 19:11 ` Eli Zaretskii
  0 siblings, 1 reply; 14+ messages in thread
From: Garreau, Alexandre @ 2014-04-13 18:27 UTC (permalink / raw)
  To: emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 288 bytes --]

Hello, smtpmail fails to send mails when the SMTP user password contain
utf8 chars, since it seems base64-encode-string doesn’t support
multibyte encoding, it prevented me to start using Gnus for some months
before I understood what was happening.

Here’s attached the patch.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2.1: Patch for smtpmail --]
[-- Type: text/x-diff, Size: 545 bytes --]

diff -Naur emacs-old/lisp/mail/smtpmail.el emacs/lisp/mail/smtpmail.el
--- emacs-old/lisp/mail/smtpmail.el	2014-04-13 18:08:54.210814676 +0000
+++ emacs/lisp/mail/smtpmail.el	2014-04-13 18:06:07.502802860 +0000
@@ -580,7 +580,7 @@
       (smtpmail-command-or-throw
        process
        (concat "AUTH PLAIN "
-	       (base64-encode-string (concat "\0" user "\0" password) t))
+	       (base64-encode-string (string-as-unibyte (concat "\0" user "\0" password)) t))
        235))
      (t
       (error "Mechanism %s not implemented" mech)))))

[-- Attachment #1.2.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 948 bytes --]

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 948 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2014-04-14 21:01 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-13 18:27 smtpmail support of unicode passwords Garreau, Alexandre
2014-04-13 19:11 ` Eli Zaretskii
2014-04-14  1:18   ` Stefan Monnier
2014-04-14  5:50     ` Stephen J. Turnbull
2014-04-14  8:18       ` Eli Zaretskii
2014-04-14  7:44     ` Eli Zaretskii
2014-04-14 12:14       ` Stephen J. Turnbull
2014-04-14 12:27         ` Eli Zaretskii
2014-04-14 12:55       ` Stefan Monnier
2014-04-14 14:57         ` Harald Hanche-Olsen
2014-04-14 15:36           ` Eli Zaretskii
2014-04-14 16:55             ` Harald Hanche-Olsen
2014-04-14 18:03               ` Stephen J. Turnbull
2014-04-14 21:01               ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).