Subject: Re: bug#7589: smtpmail: bad line endings in queued mails on Windows

From: Vida Gábor <[email-masked]>
Date: Sat, 11 Dec 2010 10:43:47 +0100

>  I think your analysis is correct.  Could you please try the patch
>  below?  If it works for you, I will install it on the Emacs 23 branch,
>  so that it will be available in the upcoming Emacs 23.3 release.

Still doesn't work. I put some (message ...) to see the value of some
variables during the execution of smtpmail-send-it and I think the
problem is possibly somewhere else.

smtpmail-code-conv-from is nil and the return value of
(coding-system-change-eol-conversion ...) is also nil right after the
function call of (set-buffer-file-coding-system ...) that you modified
in your patch.

In the body of the very first let in smtpmail-send-it, just after the
varlist, the enable-multibyte-characters is nil, and thus
smtpmail-code-conv-from is also nil. But the global vaule of
enable-multibyte-characters is t. Do you think it helps anything if I
investigate where enable-multibyte-characters is set to nil?

Here is the mail I wanted to send, the saved mail file and the trace of
SMTP:

To: [email-masked]
Subject: probe mail
Date: Sat, 11 Dec 2010 10:02:47 +0100
Message-ID: <[email-masked]>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (windows-nt)
Gcc: nnimap+nedu:incoming
From: "Vida Gábor" <[email-masked]>

a
b
c

-- 
Üdv,
Gábor

------------------------------------------------------------------------------

From: =?utf-8?Q?Vida_G=C3=A1bor?= <[email-masked]>^M
To: [email-masked]^M
Subject: probe mail^M
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (windows-nt)^M
Date: Sat, 11 Dec 2010 10:03:37 +0100^M
Message-ID: <[email-masked]>^M
MIME-Version: 1.0^M
Content-Type: text/plain; charset=utf-8^M
Content-Transfer-Encoding: base64^M
^M
YQ0KYg0KYw0KDQotLSANCsOcZHYsDQpHw6Fib3INCg==^M

------------------------------------------------------------------------------

Process SMTP deleted
220 nedu.dyndns.org ESMTP Postfix^M
EHLO EV001A4B593FDA^M
250-nedu.dyndns.org^M
250-PIPELINING^M
250-SIZE 50000000^M
250-VRFY^M
250-ETRN^M
250-ENHANCEDSTATUSCODES^M
250-8BITMIME^M
250 DSN^M
MAIL FROM:<[email-masked]> SIZE=401^M
250 2.1.0 Ok^M
RCPT TO:<[email-masked]>^M
250 2.1.5 Ok^M
DATA^M
354 End data with <CR><LF>.<CR><LF>^M
From: =?utf-8?Q?Vida_G=C3=A1bor?= <[email-masked]>^M^M
To: [email-masked]^M^M
Subject: probe mail^M^M
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (windows-nt)^M^M
Date: Sat, 11 Dec 2010 10:03:37 +0100^M^M
Message-ID: <[email-masked]>^M^M
MIME-Version: 1.0^M^M
Content-Type: text/plain; charset=utf-8^M^M
Content-Transfer-Encoding: base64^M^M
^M^M
YQ0KYg0KYw0KDQotLSANCsOcZHYsDQpHw6Fib3INCg==^M^M
.^M
250 2.0.0 Ok: queued as A2FB814F727^M
QUIT^M
221 2.0.0 Bye^M