(no title)
olivertaylor | 3 years ago
(defun compose-mail-macos (&optional to subject body)
"Compose a message using macOS's default mail program."
(interactive)
(start-process "Open Mail Message" nil "open"
(concat "mailto:"
(when to to) "?"
(when subject (concat "&subject=" (url-hexify-string subject)))
(when body (concat "&body=" (url-hexify-string body))))))
(defun compose-mail-macos-multiple (list subject body)
"ADDRESSES should be a list of email addresses in the form of:
(setq mail-list '(\"Mail 1 <mail1@example.com>\"
\"Mail 2 <mail2@example.com>\"
\"Mail 3 <mail3@example.com>\"))"
(while list
(let ((to (car list)))
(compose-mail-macos to subject body)
(setq list (cdr list)))))
No comments yet.