Hi Tushar,
You can set the From: header when composing a reply using
MU4E-COMPOSE-PRE-HOOK. Here is how I use it to manage mail
forwarding:
(setq my-mail-aliases
'(("
vse...@common-lisp.net" "
v...@oneofus.la" "Vladimir Sedach")))
(add-hook 'mu4e-compose-pre-hook
(cl-defun my-set-from-reply-address ()
(cl-flet ((set-reply-address (address name)
(setq user-mail-address address
user-full-name name)
(cl-return-from my-set-from-reply-address)))
(when mu4e-compose-parent-message
(dolist (x my-mail-aliases)
(when (mu4e-message-contact-field-matches
mu4e-compose-parent-message :to (first x))
(set-reply-address (second x) (third x)))))
(set-reply-address "
v...@oneofus.la" "Vladimir Sedach"))))
This does the *opposite* of what you are asking (I want to set From:
on replies to messages that come To:
vse...@common-lisp.net to
v...@oneofus.la because I cannot send mail from the
common-lisp.net
domain), but I hope it is clear how to use the hook and header
accessors to do what you need.
Vladimir