X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=elisp.git;a=blobdiff_plain;f=vm;h=75e3b13afd9a221c7706665585266b555187bd34;hp=0f4a218b6f372e895646a8c3d8ac99f771b5cb6d;hb=460fef0fee109c5348b01f195dbd9b460153212f;hpb=40f205380c5c7665513bae29ad0b8a785afbcc66 diff --git a/vm b/vm index 0f4a218..75e3b13 100644 --- a/vm +++ b/vm @@ -162,6 +162,7 @@ ;; (add-to-list 'vm-mime-default-face-charsets "iso-8859-1") ;; (add-to-list 'vm-mime-default-face-charsets "Windows-1251") ;; (add-hook 'vm-mail-send-hook 'ff/vm-remove-non-7bits-in-headers) + (add-hook 'vm-mail-send-hook 'vm-mime-encode-headers) (add-hook 'vm-mail-send-hook 'vm-mail-check-recipients) (add-hook 'vm-reply-hook (lambda () (set-buffer-modified-p nil))) @@ -337,7 +338,8 @@ attachement from mail." (ff/configure-faces ;; '((ff/mail-header-face :background "#c8c8ff")) - '((ff/mail-header-face :foreground "blue4")) + '((ff/mail-header-face :background "#f0f0f0")) + ;; '((ff/mail-header-face :foreground "blue4")) ) (defun ff/colorize-headers () (interactive) @@ -488,6 +490,21 @@ an attachment") ) +(defun ff/check-no-prolematic-dest () + "Check that there are no \">,[^\ $]\" in the header" + (let ((s "no-subject")) + (save-excursion + (goto-char (point-min)) + (let ((end-header (re-search-forward (concat "^" mail-header-separator "$") nil t))) + (when end-header + (goto-char (point-min)) + (re-search-forward ">,[^\ ]" end-header t nil) + ) + ) + ) + s)) + + ;; You can not have a line starting with "From:" in a pure text ;; mail. The smtp server would add a leading character to prevent it. @@ -662,7 +679,8 @@ instance, someone in bbdb named \"Paul Smith\" would generate an alias (email (car (elt record 6))) (alias (downcase (replace-regexp-in-string "\\([a-zA-Z]?\\)[^- ]*[- ]*" "\\1" name)))) - (if (and (> (length alias) 1) + (if (and email + (> (length alias) 1) ;; Do not overwrite an existing alias (not (and mail-abbrevs (intern-soft alias mail-abbrevs)))) (define-mail-abbrev alias email))