summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2022-10-22 20:45:27 -0400
committerSacha Chua <sacha@sachachua.com>2022-10-22 20:45:27 -0400
commit2b9059b57e2e904dd06e2efa96e4ad345d86bd8a (patch)
tree60f9e46e5947ac5328fdebe0a82b9ba561cf5c28
parentb816389ad4de0ddce2f3b8947a3954d4f3a9b5f7 (diff)
downloademacsconf-el-2b9059b57e2e904dd06e2efa96e4ad345d86bd8a.tar.xz
emacsconf-el-2b9059b57e2e904dd06e2efa96e4ad345d86bd8a.zip
make mail a little more flexible
Diffstat (limited to '')
-rw-r--r--emacsconf-mail.el11
1 files changed, 5 insertions, 6 deletions
diff --git a/emacsconf-mail.el b/emacsconf-mail.el
index c5ec599..12ba105 100644
--- a/emacsconf-mail.el
+++ b/emacsconf-mail.el
@@ -33,9 +33,9 @@
(email (plist-get (seq-find (lambda (o) (string= (plist-get o :slug) slug)) info) :email)))
(assoc email grouped))))
-(defun emacsconf-mail-prepare (template group attrs)
+(defun emacsconf-mail-prepare (template email attrs)
(compose-mail
- (car group)
+ email
(emacsconf-replace-plist-in-string attrs (plist-get template :subject))
`(("Reply-To" . ,(emacsconf-replace-plist-in-string attrs (plist-get template :reply-to)))
("Mail-Followup-To" . ,(emacsconf-replace-plist-in-string attrs (plist-get template :mail-followup-to)))
@@ -53,9 +53,8 @@
(emacsconf-mail-merge-get-template-from-subtree)
(emacsconf-mail-merge-get-template
(completing-read "Template: " (org-property-values "EMAIL_ID")))))
- (mail-func (plist-get template :function))
- (group (emacsconf-mail-complete-email-group)))
- (funcall mail-func (cons user-mail-address (cdr group)) template)))
+ (mail-func (plist-get template :function)))
+ (funcall mail-func user-mail-address template)))
(defun emacsconf-mail-template-to-group ()
"Prompt for a speaker and e-mail current template to them."
@@ -89,7 +88,7 @@
(defun emacsconf-mail-group-by-email (info)
(seq-group-by (lambda (o) (plist-get o :email)) info))
-(defun emacsconf-mail-speaker (&optional subject body)
+(defun emacsconf-mail-speaker (&optional subject body talk)
"Compose a message to the speaker of the current talk."
(interactive)
(compose-mail (format "%s <%s>" (org-entry-get (point) "NAME") (org-entry-get (point) "EMAIL")) subject)