diff options
author | Glenn Morris <rgm@gnu.org> | 2018-10-23 09:39:11 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2018-10-23 09:39:11 -0700 |
commit | 5aa41f775e1e69dba7c6f2b2a8d0334ca9c2cfdb (patch) | |
tree | c0bff44180b6b35e3d690a1a385d006ea8ba8adb /lisp/mail/smtpmail.el | |
parent | 5c5bed72a6b2963a28443f70c8c5c8e510b81f26 (diff) | |
parent | 2efd40076c8977aaf54d7478db96e5dbf623f37d (diff) | |
download | emacs-5aa41f775e1e69dba7c6f2b2a8d0334ca9c2cfdb.tar.gz emacs-5aa41f775e1e69dba7c6f2b2a8d0334ca9c2cfdb.tar.bz2 emacs-5aa41f775e1e69dba7c6f2b2a8d0334ca9c2cfdb.zip |
Merge from origin/emacs-26
2efd400 (origin/emacs-26) Correct typo in GNU ELPA url
6239016 * doc/misc/dired-x.texi (Omitting Variables): Fix wording. (B...
1531bca Fix help-form binding in dired-create-files
cf79327 Fix a pasto in a Gnus doc string
a4e40f6 ; * doc/emacs/files.texi (Reverting): Improve wording in last...
f632ecb Update revert-buffer documentation
eb67689 * lisp/mail/smtpmail.el (smtpmail-send-queued-mail): Load fil...
433e364 ; * etc/NEWS: Announce that emacs-module.h is now installed.
# Conflicts:
# lisp/mail/smtpmail.el
Diffstat (limited to 'lisp/mail/smtpmail.el')
-rw-r--r-- | lisp/mail/smtpmail.el | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 9b045b25584..8a1e86b7750 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -397,35 +397,35 @@ for `smtpmail-try-auth-method'.") (with-temp-buffer ;; Get index, get first mail, send it, update index, get second ;; mail, send it, etc... - (let ((file-msg "") + (let (file-data file-elisp (qfile (expand-file-name smtpmail-queue-index-file smtpmail-queue-dir)) result) (insert-file-contents qfile) (goto-char (point-min)) (while (not (eobp)) - (setq file-msg (buffer-substring (point) (line-end-position))) + (setq file-data (buffer-substring (point) (line-end-position))) + (setq file-elisp (concat file-data ".el")) ;; FIXME: Avoid `load' which can execute arbitrary code and is hence ;; a source of security holes. Better read the file and extract the ;; data "by hand". - ;;(load file-msg) + ;;(load file-elisp) (with-temp-buffer - (insert-file-contents (concat file-msg ".el")) + (insert-file-contents file-elisp) (goto-char (point-min)) (pcase (read (current-buffer)) (`(setq smtpmail-recipient-address-list ',v) (skip-chars-forward " \n\t") (unless (eobp) (message "Ignoring trailing text in %S" - (concat file-msg ".el"))) + file-elisp)) (setq smtpmail-recipient-address-list v)) - (sexp (error "Unexpected code in %S: %S" - (concat file-msg ".el") sexp)))) + (sexp (error "Unexpected code in %S: %S" file-elisp sexp)))) ;; Insert the message literally: it is already encoded as per ;; the MIME headers, and code conversions might guess the ;; encoding wrongly. (with-temp-buffer (let ((coding-system-for-read 'no-conversion)) - (insert-file-contents file-msg)) + (insert-file-contents file-data)) (let ((smtpmail-mail-address (or (and mail-specify-envelope-from (mail-envelope-from)) user-mail-address))) @@ -435,8 +435,8 @@ for `smtpmail-try-auth-method'.") (current-buffer))) (error "Sending failed: %s" result)) (error "Sending failed; no recipients")))) - (delete-file file-msg) - (delete-file (concat file-msg ".el")) + (delete-file file-data) + (delete-file file-elisp) (delete-region (point-at-bol) (point-at-bol 2))) (write-region (point-min) (point-max) qfile)))) |