[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master e3bd6c4: mailclient can't send attachments
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master e3bd6c4: mailclient can't send attachments |
Date: |
Sun, 22 Sep 2019 18:07:14 -0400 (EDT) |
branch: master
commit e3bd6c406da2ea98bfcf6bbd37db78462fd75b31
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
mailclient can't send attachments
* lisp/mail/mailclient.el (mailclient-send-it): Warn about trying
to send attachments (bug#34992).
---
lisp/mail/mailclient.el | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/lisp/mail/mailclient.el b/lisp/mail/mailclient.el
index 4d8cda1..0c2594c 100644
--- a/lisp/mail/mailclient.el
+++ b/lisp/mail/mailclient.el
@@ -47,6 +47,7 @@
(require 'sendmail) ;; for mail-sendmail-undelimit-header
(require 'mail-utils) ;; for mail-fetch-field
(require 'browse-url)
+(require 'mail-parse)
(defcustom mailclient-place-body-on-clipboard-flag
(fboundp 'w32-set-clipboard-data)
@@ -141,6 +142,14 @@ The mail client is taken to be the handler of mailto URLs."
(concat
(save-excursion
(narrow-to-region (point-min) delimline)
+ ;; We can't send multipart/* messages (i. e. with
+ ;; attachments or the like) via this method.
+ (when-let ((type (mail-fetch-field "content-type")))
+ (when (and (string-match "multipart"
+ (car (mail-header-parse-content-type
+ type)))
+ (not (y-or-n-p "Message with attachments can't be
sent via mailclient; continue anyway?")))
+ (error "Choose a different `send-mail-function' to send
attachments")))
(goto-char (point-min))
(setq coding-system
(if (re-search-forward mime-charset-pattern nil t)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master e3bd6c4: mailclient can't send attachments,
Lars Ingebrigtsen <=