Mercurial > hg > xemacs
comparison mail-from-m.el @ 78:0abfe9bf83a0
merge
| author | Henry S. Thompson <ht@inf.ed.ac.uk> |
|---|---|
| date | Thu, 25 Sep 2025 17:57:05 +0100 |
| parents | c343c57a93e8 |
| children |
comparison
equal
deleted
inserted
replaced
| 77:62fb1a21629a | 78:0abfe9bf83a0 |
|---|---|
| 1 ;;; Load to read and send mail from maritain | |
| 2 | |
| 3 (setq mail-append-host "home.hst.name") | |
| 4 (make-variable-buffer-local 'user-mail-address) | |
| 5 (setq-default user-mail-address (format "%s@home.hst.name" user-name)) | |
| 6 (setq mail-host-address "home.hst.name") | |
| 7 (defun system-name () "home.hst.name") | |
| 8 | |
| 9 (let ((hdn (format "/home/%s" user-name))) | |
| 10 (let ((sfn (format "%s/.sig.pers" hdn))) | |
| 11 (setq mail-signature-file sfn | |
| 12 message-signature-file sfn | |
| 13 mail-signature t | |
| 14 message-signature t) | |
| 15 ) | |
| 16 (setq gnus-default-directory hdn | |
| 17 gnus-home-directory hdn | |
| 18 my-mail-dir (format "%s/mail" hdn) | |
| 19 mail-sources `((file :path ,(format "/var/spool/mail/%s" user-name))) | |
| 20 mail-archive-file-name (concat my-mail-dir "/cpy/general/" | |
| 21 (format-time-string | |
| 22 "%Y-%m" (current-time)) | |
| 23 ".mbox")) | |
| 24 ) | |
| 25 | |
| 26 (setq mail-archive-file-name (expand-file-name "~/mail/cpy/general")) | |
| 27 | |
| 28 ;; sending mail on the road | |
| 29 ;(setq send-mail-function 'smtpmail-send-it) | |
| 30 ;(setq message-send-mail-function 'smtpmail-send-it) | |
| 31 ;(setq smtpmail-default-smtp-server "localhost") | |
| 32 ;(setq smtpmail-smtp-service "smtp") | |
| 33 ;(setq smtpmail-local-domain "home.hst.name") | |
| 34 (setq smtpmail-debug-info t) | |
| 35 (load "smtpmail" nil t) | |
| 36 (setq smtpmail-code-conv-from nil) | |
| 37 | |
| 38 | |
| 39 (defun quaker-sig-maybe () | |
| 40 (save-excursion | |
| 41 (goto-char (point-min)) | |
| 42 (cond ((to-quaker-p) | |
| 43 (goto-char (point-min)) | |
| 44 (cond ((re-search-forward "^From: .*ht@home.hst.name" nil t) | |
| 45 ;; will fail on mhmcc | |
| 46 (backward-char 13) | |
| 47 (delete-char 4) | |
| 48 (insert "rsof") | |
| 49 (goto-char (point-max)) | |
| 50 (search-backward "\n-- \n") | |
| 51 (when (looking-at "\n-- \nHenry") | |
| 52 (forward-char 5) | |
| 53 (kill-entire-line 5) | |
| 54 (insert-file "~/.quaker-sig")))))))) | |
| 55 | |
| 56 (defun from-mhmcc () | |
| 57 (interactive) | |
| 58 ;; This is cribbed from the value of | |
| 59 ;; (gnus-configure-posting-styles "mhmcc-2024") | |
| 60 (let ((user-full-name "HST as Convenor SESAM MHMC") | |
| 61 (user-mail-address "mhmcc@rsof.hst.name")) | |
| 62 (set (make-local-variable (quote user-mail-address)) | |
| 63 "mhmcc@rsof.hst.name") | |
| 64 (save-excursion | |
| 65 (message-remove-header "From") | |
| 66 (message-goto-eoh) | |
| 67 (insert "From: " (message-make-from) " | |
| 68 ") | |
| 69 )) | |
| 70 (save-excursion | |
| 71 (let ((message-signature | |
| 72 "Henry S. Thompson, Convenor, SESAM Meeting House Management Committee | |
| 73 ")) | |
| 74 (message-insert-signature) | |
| 75 (re-search-backward "^--") | |
| 76 (let ((p (point))) | |
| 77 (kill-region (re-search-backward "^--") p)) | |
| 78 )) | |
| 79 (save-excursion | |
| 80 (message-remove-header "Reply-to") | |
| 81 (let ((value "sesam.emh.management@gmail.com")) | |
| 82 (when value | |
| 83 (message-goto-eoh) | |
| 84 (insert "Reply-to" ": " value) | |
| 85 (unless (bolp) (insert " | |
| 86 ")) | |
| 87 )) | |
| 88 ) | |
| 89 (save-excursion (message-remove-header "Bcc") (let ((value "sesam.emh.management@gmail.com")) (when value (message-goto-eoh) (insert "Bcc" ": " value) (unless (bolp) (insert " | |
| 90 "))))) | |
| 91 ) | |
| 92 ; (let ((use-this (gnus-configure-posting-styles "mhmcc-2024")) | |
| 93 ; (gnus-posting-styles nil)) | |
| 94 ; (mapc (lambda (expr) | |
| 95 ; (let ((varbind (and (listp expr) | |
| 96 ; (eq (car (caadr expr)) 'save-excursion) | |
| 97 ; (caadr (cadr (caddr expr)))))) | |
| 98 ; (unless (and (eq (car varbind) 'message-signature) | |
| 99 ; (not (position "Convenor" (cadr varbind)))) | |
| 100 ; (apply expr nil)))) | |
| 101 ; )) | |
| 102 | |
| 103 (provide 'mail-from-m) |
