[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Gnus: How to easily change "From:" from the default to a second acco
From: |
Eric Abrahamsen |
Subject: |
Re: Gnus: How to easily change "From:" from the default to a second account's address? |
Date: |
Fri, 25 Nov 2011 11:12:12 +0800 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.91 (gnu/linux) |
On Fri, Nov 25 2011, Philipp Haselwarter wrote:
> I often find myself wanting to change the From: after opening the
> message; this allows picking one of your accounts:
Is this much different from `message-alternative-emails'? I think that's
what I use to set my possible From addresses, and then TAB at the end of
the address will cycle through the possible addresses.
Eric
> #+begin_src emacs-lisp
> (defcustom my-smtp-accounts nil
> "*list of available smtp accounts"
> :group 'smtpmail
> :type '(repeat alist))
>
> (defun my-pick-smtp ()
> (interactive)
> (setq user-mail-address
> (let ((f (if (functionp 'ido-completing-read)
> 'ido-completing-read
> completing-read)))
> (funcall f "Which smtp acc:" (mapcar 'cadr my-smtp-accounts))))
> (save-excursion
> (save-restriction
> (message-narrow-to-headers-or-head)
> (message-remove-header "From")
> (goto-char (point-max))
> (insert "From: " (message-make-from) "\n"))))
>
> #+end_src
--
GNU Emacs 24.0.91.1 (i686-pc-linux-gnu, GTK+ Version 2.24.6)
of 2011-11-07 on pellet
RE: Gnus: How to easily change "From:" from the default to a second account's address?, Memnon Anon, 2011/11/27