[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [smtpmail.el] Encoding problem in smtpmail-send-queued-mail
From: |
Jesper Harder |
Subject: |
Re: [smtpmail.el] Encoding problem in smtpmail-send-queued-mail |
Date: |
Sun, 09 Dec 2001 03:54:37 +0100 |
User-agent: |
Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (i686-pc-linux-gnu) |
Simon Josefsson <jas@extundo.com> writes:
> Jesper Harder <harder@ifa.au.dk> writes:
>
>> Making `smtpmail-send-queued-mail' open the file with the queued mail
>> literally fixes the problem for me:
>
> FWIW I agree that this patch probably isn't the right thing. The file
> was saved using one coding system, so visiting it literally probably
> just happens to work for latin-1.
>
> It seems as if `smtpmail-code-conv-from' is not set when sending
> messages from the queue.
I've read the code a bit more carefully now, and I agree. Binding
`smtpmail-code-conv-from' is probably the right thing to do.
> I think it should. Can you try this patch instead of yours?
>
> --- smtpmail.el.~1.36.~ Sat Dec 1 01:36:12 2001
> +++ smtpmail.el Sat Dec 8 17:43:42 2001
> @@ -370,7 +370,12 @@
> ;;; Get index, get first mail, send it, get second mail, etc...
> (let ((buffer-index (find-file-noselect smtpmail-queue-index))
> (file-msg "")
> - (tembuf nil))
> + (tembuf nil)
> + (smtpmail-code-conv-from
> + (if enable-multibyte-characters
> + (let ((sendmail-coding-system smtpmail-code-conv-from))
> + (with-current-buffer buffer-index
> + (select-message-coding-system)))))))
> (with-current-buffer buffer-index
> (beginning-of-buffer)
> (while (not (eobp))
But this doesn't work, because `buffer-index' doesn't contain the
email. How about this instead:
*** emacs-21.1/lisp/mail/smtpmail.el Tue Aug 7 16:43:48 2001
--- smtpmail.el Sun Dec 9 03:36:19 2001
***************
*** 311,325 ****
(point))))
(load file-msg)
(setq tembuf (find-file-noselect file-msg))
! (if (not (null smtpmail-recipient-address-list))
! (if (not (smtpmail-via-smtp smtpmail-recipient-address-list
! tembuf))
! (error "Sending failed; SMTP protocol error"))
! (error "Sending failed; no recipients"))
! (delete-file file-msg)
! (delete-file (concat file-msg ".el"))
! (kill-buffer tembuf)
! (kill-line 1))
(set-buffer buffer-index)
(save-buffer smtpmail-queue-index)
(kill-buffer buffer-index)
--- 311,330 ----
(point))))
(load file-msg)
(setq tembuf (find-file-noselect file-msg))
! (let ((smtpmail-code-conv-from
! (when enable-multibyte-characters
! (let ((sendmail-coding-system smtpmail-code-conv-from))
! (with-current-buffer tembuf
! (select-message-coding-system))))))
! (if (not (null smtpmail-recipient-address-list))
! (if (not (smtpmail-via-smtp smtpmail-recipient-address-list
! tembuf))
! (error "Sending failed; SMTP protocol error"))
! (error "Sending failed; no recipients"))
! (delete-file file-msg)
! (delete-file (concat file-msg ".el"))
! (kill-buffer tembuf)
! (kill-line 1)))
(set-buffer buffer-index)
(save-buffer smtpmail-queue-index)
(kill-buffer buffer-index)
Re: [smtpmail.el] Encoding problem in smtpmail-send-queued-mail, Simon Josefsson, 2001/12/08
- Re: [smtpmail.el] Encoding problem in smtpmail-send-queued-mail, Jesper Harder, 2001/12/08
- Re: [smtpmail.el] Encoding problem in smtpmail-send-queued-mail, Simon Josefsson, 2001/12/08
- Re: [smtpmail.el] Encoding problem in smtpmail-send-queued-mail, Jesper Harder, 2001/12/08
- Re: [smtpmail.el] Encoding problem in smtpmail-send-queued-mail,
Jesper Harder <=
- Re: [smtpmail.el] Encoding problem in smtpmail-send-queued-mail, Eli Zaretskii, 2001/12/09
- Re: [smtpmail.el] Encoding problem in smtpmail-send-queued-mail, Jesper Harder, 2001/12/09
- Re: [smtpmail.el] Encoding problem in smtpmail-send-queued-mail, Eli Zaretskii, 2001/12/11
- Re: [smtpmail.el] Encoding problem in smtpmail-send-queued-mail, Simon Josefsson, 2001/12/11
- Re: [smtpmail.el] Encoding problem in smtpmail-send-queued-mail, Eli Zaretskii, 2001/12/10
- Re: [smtpmail.el] Encoding problem in smtpmail-send-queued-mail, Simon Josefsson, 2001/12/10
- Re: [smtpmail.el] Encoding problem in smtpmail-send-queued-mail, Eli Zaretskii, 2001/12/10