diff options
-rw-r--r-- | email.org | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -76,7 +76,7 @@ (setq message-expand-name-standard-ui t) #+end_src -*** Bcc +*** To->From and Bcc #+begin_src emacs-lisp (defvar jao-message--bcc-rx (regexp-opt '("mail.io" "gnu.org"))) @@ -87,6 +87,19 @@ (add-hook 'message-header-setup-hook #'jao-message-insert-bcc) + (defvar jao-message-to-from nil) + + (defun jao-message-adjust-from () + (let ((to (concat (message-fetch-field "To") (message-fetch-field "Cc")))) + (when-let* ((tf (seq-find (lambda (tf) (string-match-p (car tf) to)) + jao-message-to-from)) + (from (message-make-from "Jose A Ortega Ruiz" (cdr tf)))) + (save-restriction + (widen) + (message-replace-header "From" from))))) + + (add-hook 'message-header-setup-hook #'jao-message-adjust-from) + #+end_src *** Encryption #+begin_src emacs-lisp |