[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: In sending mail, i wish to choose one address(From:) in multiple acc
Re: In sending mail, i wish to choose one address(From:) in multiple accounts
Thu, 21 Nov 2019 10:36:36 +0100
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
On Thu, 21 Nov 2019 12:31:59 +0900
> before, i send question via news but it may be gone Gmane's spam folder
> so again i re-send mail. Well i have 3 accounts. At first when i send
> mail, i wish to choose one address. There is good reference i think but
> i did fail to search, please help me...
The `gnus-posting-styles' solution proposed by Alberto is useful if
there are circumstances (often based on the article you're replying to)
that allow choosing the address and other things programmatically
(non-interactively). If all you want is pick an address manually when
composing a new message, you can do something like the following:
(defun my-compose-mail-advice (orig &rest args)
"Read `user-mail-address' from minibuffer."
(interactive (lambda (spec)
(completing-read "From: " '("firstname.lastname@example.org"
(from (message-make-from user-full-name
(spec (advice-eval-interactive-spec spec)))
(push (cons 'From from) (nth 2 spec))
(apply orig args))
(advice-add 'compose-mail :around #'my-compose-mail-advice)