Yes I've tried the code on that page too. I don't see how it works if
I have multiple messages in one inbox that were sent to different
addresses. But I do like the "prompt for from address" from that page.
I'm trying to combine that with the code on the Compose Hooks page
1) Reply using the field in to: or cc:
2) Compose using interactive select from: address
I have (1), and with the assistance Chris have (1) plus use a default
address, but would like to have (1) and (2).
-k.
On Mon, 20 Jan 2014, Jeroen Tiebout wrote:
I have no issues using my-mu4e-set-account from this page:
http://www.djcbsoftware.nl/code/mu/mu4e/Multiple-accounts.html
Cheers,
Jeroen
[email protected] writes:
The example
here http://www.djcbsoftware.nl/code/mu/mu4e/Compose-hooks.html#Compose-hooks
is a nice example and when I hit "reply" my outgoing message is now based
on who the incoming message was sent to.
But when I try to compose a new message, rather than reply, it fails, with
"message must be non-nil".
I've tried modifying that function (see below), but cannot get it to work.
Advice much appreciated...
-k.
(add-hook 'mu4e-compose-pre-hook
(defun my-set-from-address ()
"Set the From address based on the To address of the original."
(let ((msg mu4e-compose-parent-message)) ;; msg is shorter...
(if (boundp 'msg)
(setq user-mail-address
(cond
((mu4e-message-contact-field-matches msg :to "[email protected]")
"[email protected]")
((mu4e-message-contact-field-matches msg :to "[email protected]")
"[email protected]")
(t "[email protected]")))
(setq user-mail-address "[email protected]") ; default for COMPOSE
)))
--
You received this message because you are subscribed to the Google Groups
"mu-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.