From: teranisi Date: Wed, 22 Nov 2000 11:08:18 +0000 (+0000) Subject: * wl-draft.el (wl-draft-smtp-send-buffer): New function (for compatibility). X-Git-Tag: wl-2_4_0pre3~1 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=acec076dd43bc7df5dcf118cb725af688346da16;p=elisp%2Fwanderlust.git * wl-draft.el (wl-draft-smtp-send-buffer): New function (for compatibility). (wl-draft-send-mail-with-smtp): Use it. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 295b642..5cdda0e 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,5 +1,9 @@ 2000-11-22 Yuuichi Teranishi + * wl-draft.el (wl-draft-smtp-send-buffer): New function + (for compatibility). + (wl-draft-send-mail-with-smtp): Use it. + * wl-summary.el (wl-summary-save-view-cache): Delete duplicated `write-region'; Use `write-region-as-binary' instead of `as-binary-output-file' and diff --git a/wl/wl-draft.el b/wl/wl-draft.el index 9edf607..c3402dc 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -918,6 +918,27 @@ non-nil." (setq fields (cdr fields))) recipients)))) +(static-if (fboundp 'smtp-send-buffer) +(defun wl-draft-smtp-send-buffer (sender recipients buffer id) + (wl-smtp-extension-bind + (condition-case err + (smtp-send-buffer sender recipients (current-buffer)) + (error + (wl-draft-write-sendlog 'failed 'smtp smtp-server + recipients id) + (signal (car err) (cdr err)))))) +(defun wl-draft-smtp-send-buffer (sender recipients buffer id) + (as-binary-process + (wl-smtp-extension-bind + (let ((err (smtp-via-smtp sender recipients + (current-buffer)))) + (when (not (eq err t)) + (wl-draft-write-sendlog 'failed 'smtp smtp-server + recipients id) + (error "Sending failed; SMTP protocol error:%s" err)))))) +;; end of static-if +) + ;; ;; from Semi-gnus ;; @@ -976,18 +997,12 @@ non-nil." (wl-draft-delete-field "bcc" delimline) (wl-draft-delete-field "resent-bcc" delimline) (let (process-connection-type) - (as-binary-process - (when recipients - (wl-smtp-extension-bind - (let ((err (smtp-via-smtp sender recipients - (current-buffer)))) - (when (not (eq err t)) - (wl-draft-write-sendlog 'failed 'smtp smtp-server - recipients id) - (error "Sending failed; SMTP protocol error:%s" err)))) - (wl-draft-set-sent-message 'mail 'sent) - (wl-draft-write-sendlog - 'ok 'smtp smtp-server recipients id))))) + (when recipients + (wl-draft-smtp-send-buffer sender recipients (current-buffer) + id) + (wl-draft-set-sent-message 'mail 'sent) + (wl-draft-write-sendlog + 'ok 'smtp smtp-server recipients id)))) (if (bufferp errbuf) (kill-buffer errbuf))))))