comparison mail-from-m.el @ 32:cb9b76219c55

attempt to merge mail read and send from all over
author Henry S Thompson <ht@inf.ed.ac.uk>
date Sun, 08 Oct 2023 16:36:27 +0100
parents 6097ab2da4ce
children d9297098442b
comparison
equal deleted inserted replaced
31:129123962e51 32:cb9b76219c55
1 ;;; Edit and load to send mail as from ... 1 ;;; Load to read and send mail from maritain
2
2 (setq mail-append-host "home.hst.name") 3 (setq mail-append-host "home.hst.name")
3 (setq user-full-name "Henry S. Thompson") 4 (setq user-full-name "Henry S. Thompson")
4 (setq user-mail-address "ht@home.hst.name") 5 (setq user-mail-address "ht@home.hst.name")
5 (setq mail-host-address "home.hst.name") 6 (setq mail-host-address "home.hst.name")
6 (setq mail-signature-file "/home/ht/.sig.pers") 7 (setq mail-signature-file "/home/ht/.sig.pers")
7 (setq mail-signature t) 8 (setq mail-signature t)
8 (setq message-signature-file "/home/ht/.sig.pers") 9 (setq message-signature-file "/home/ht/.sig.pers")
9 (setq message-signature t) 10 (setq message-signature t)
10 (defun system-name () "home.hst.name") 11 (defun system-name () "home.hst.name")
12
13 (setq gnus-default-directory "/home/ht"
14 my-mail-dir "/home/ht/mail"
15 )
16
17 (defun set-nnmail-split-fancy ()
18 (setq nnmail-split-fancy
19 (let ((month (format-time-string "%Y-%m" (current-time))))
20 (cons '|
21 (append '(("Subject" "testing" "jjunk")
22 (to "quaker-\\(l\\|spectrum\\)" "quaker-2022")
23 (to "quaker-b" "quaker-b")
24 (to "[cC]ygwin" "cygwin")
25 (from "noreply@mrooms.net" "nayler")
26 (to "ht@rsof.hst.name" "quaker-2023")
27 (to "Wardenship@lists.quaker.eu.org" "wardens")
28 (to "mhmcc@rsof.hst.name" "mhmcc-2023")
29 ("Envelope-to" "mhmcc@rsof.hst.name"
30 (| (from "mhmcc@rsof.hst.name" junk)
31 "mhmcc-2023"))
32 (to "mfw@rsof.hst.name" "7vt")
33 (to "zphdaily" (concat "pers-" month))
34 (to "inf\\(pg\\|msc\\|teach\\|res\\|staff\\)" "inf-\\1" )
35 )
36 (list (list 'to
37 "ht\\|h\\.?thompson?"
38 (concat "pers-" month))
39 (concat "group-"
40 (format-time-string
41 "%Y-%m" (current-time))
42 "")))))))
43
44 (setq gnus-posting-styles
45 `((".*"
46 (signature-file ,mail-signature-file))
47 ("quaker-2023"
48 (signature-file "/home/ht/.quaker-sig")
49 (address "ht@rsof.hst.name"))
50 ("mhmcc-2023"
51 (signature-file "/home/ht/.mhmcc-sig")
52 ("Reply-to" "sesam.emh.management@gmail.com")
53 (name "HST as Convenor SESAM MHMC")
54 (address "mhmcc@rsof.hst.name")
55 ("Bcc" "sesam.emh.management@gmail.com"))))
11 56
12 ;; sending mail on the road 57 ;; sending mail on the road
13 ;(setq send-mail-function 'smtpmail-send-it) 58 ;(setq send-mail-function 'smtpmail-send-it)
14 ;(setq message-send-mail-function 'smtpmail-send-it) 59 ;(setq message-send-mail-function 'smtpmail-send-it)
15 ;(setq smtpmail-default-smtp-server "localhost") 60 ;(setq smtpmail-default-smtp-server "localhost")
17 ;(setq smtpmail-local-domain "home.hst.name") 62 ;(setq smtpmail-local-domain "home.hst.name")
18 (setq smtpmail-debug-info t) 63 (setq smtpmail-debug-info t)
19 (load "smtpmail" nil t) 64 (load "smtpmail" nil t)
20 (setq smtpmail-code-conv-from nil) 65 (setq smtpmail-code-conv-from nil)
21 66
67
68 (defun quaker-sig-maybe ()
69 (save-excursion
70 (goto-char (point-min))
71 (cond ((to-quaker-p)
72 (goto-char (point-min))
73 (cond ((search-forward "\nFrom: ht@home.hst.name" nil t)
74 (backward-char 13)
75 (delete-char 4)
76 (insert "rsof")))))
77
78 (goto-char (point-max))
79 (search-backward "\n-- \n")
80 (when (looking-at "\n-- \nHenry")
81 (forward-char 5)
82 (kill-entire-line 5)
83 (insert-file "~/.quaker-sig"))))
84
22 (provide 'mail-from-m) 85 (provide 'mail-from-m)