From 38c648925349f97fac16ec601d453ca60f3c524b Mon Sep 17 00:00:00 2001 From: Marc Pohling Date: Wed, 22 May 2024 15:07:15 +0200 Subject: [PATCH] made org-outlook-new-mail able to accept cc and bcc --- config.org | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/config.org b/config.org index e8c36ea..daec95f 100644 --- a/config.org +++ b/config.org @@ -959,6 +959,7 @@ Requires on system ;(use-package notmuch ; :ensure t) (use-package mu4e + :if *sys/linux* :ensure nil :after (org)) #+end_src @@ -1014,7 +1015,16 @@ End Sub (w32-shell-execute "open" "outlook" (concat " /select outlook:" id))) (defun my--org-outlook-new-mail (receipients) - (w32-shell-execute "open" "outlook" (concat " /c ipm.note /m " receipients))) + ; separate RECEIPIENTS for main, cc and bcc by | + (setq recp (split-string receipients "|")) + (setq mailstring (concat " /c ipm.note /m " (nth 0 recp))) + (if (nth 1 recp) + ; this check has tp be separated because (and..) would stumble over a nil + (if (not (equal "" (nth 1 recp))) + (setq mailstring (concat mailstring "&cc=" (nth 1 recp))))) + (if (nth 2 recp) + (setq mailstring (concat mailstring "&bcc=" (nth 2 recp)))) + (w32-shell-execute "open" "outlook" mailstring)) (defun my/org-outlook-open-test () (interactive)