mirror of
https://github.com/pestctrl/emacs-config.git
synced 2026-02-16 16:24:18 +00:00
read mail
This commit is contained in:
parent
b2d3ffa6da
commit
7686226ab8
1 changed files with 11 additions and 9 deletions
|
|
@ -80,9 +80,11 @@
|
||||||
|
|
||||||
(defvar my/email-accounts
|
(defvar my/email-accounts
|
||||||
'("bensonchu457@fastmail.com"
|
'("bensonchu457@fastmail.com"
|
||||||
|
"bensonchu@fastmail.com"
|
||||||
"bensonchu457@gmail.com"
|
"bensonchu457@gmail.com"
|
||||||
"me@mail.pestctrl.io"
|
"me@mail.pestctrl.io"
|
||||||
"dev@mail.pestctrl.io"))
|
"dev@mail.pestctrl.io"
|
||||||
|
"accounts@mail.pestctrl.io"))
|
||||||
|
|
||||||
(defun my/mu-init ()
|
(defun my/mu-init ()
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|
@ -94,16 +96,16 @@
|
||||||
|
|
||||||
(defun my-mu4e-set-account ()
|
(defun my-mu4e-set-account ()
|
||||||
(setq user-mail-address
|
(setq user-mail-address
|
||||||
(if (not mu4e-compose-parent-message)
|
(or (and mu4e-compose-parent-message
|
||||||
|
(mu4e-contact-email
|
||||||
|
(-any
|
||||||
|
#'(lambda (x)
|
||||||
|
(mu4e-message-contact-field-matches-me mu4e-compose-parent-message
|
||||||
|
x))
|
||||||
|
'(:to :cc :bcc :from))))
|
||||||
(completing-read "Compose with account: "
|
(completing-read "Compose with account: "
|
||||||
my/email-accounts
|
my/email-accounts
|
||||||
nil t)
|
nil t))))
|
||||||
(mu4e-contact-email
|
|
||||||
(-any
|
|
||||||
#'(lambda (x)
|
|
||||||
(mu4e-message-contact-field-matches-me mu4e-compose-parent-message
|
|
||||||
x))
|
|
||||||
'(:to :cc :bcc :from))))))
|
|
||||||
|
|
||||||
(add-hook 'mu4e-compose-pre-hook 'my-mu4e-set-account)
|
(add-hook 'mu4e-compose-pre-hook 'my-mu4e-set-account)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue