[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-mime 470808cc14 070/118: Added support for MAIL_FROM p
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/org-mime 470808cc14 070/118: Added support for MAIL_FROM property |
Date: |
Wed, 5 Jan 2022 07:58:47 -0500 (EST) |
branch: elpa/org-mime
commit 470808cc14bddd61e2229358443856b793a979bd
Author: Nick Anderson <nick@cmdln.org>
Commit: Nick Anderson <nick@cmdln.org>
Added support for MAIL_FROM property
---
org-mime.el | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/org-mime.el b/org-mime.el
index 0d9add81c6..0fb34a3954 100644
--- a/org-mime.el
+++ b/org-mime.el
@@ -43,13 +43,14 @@
;;
;; `org-mime-org-subtree-htmlize' is similar to `org-mime-org-buffer-htmlize'
;; but works on current subtree. It can read following subtree properties:
-;; MAIL_SUBJECT, MAIL_TO, MAIL_CC, and MAIL_BCC.
+;; MAIL_SUBJECT, MAIL_TO, MAIL_FROM, MAIL_CC, and MAIL_BCC.
;;
;; Here is the sample of a subtree:
;; * mail one
;; :PROPERTIES:
;; :MAIL_SUBJECT: mail title
;; :MAIL_TO: person1@gmail.com
+;; :MAIL_FROM: sender@gmail.com
;; :MAIL_CC: person2@gmail.com
;; :MAIL_BCC: person3@gmail.com
;; :END:
@@ -479,16 +480,20 @@ If SUBTREEP is t, curret org node is subtree."
(message "Warning: org-element-map is not available. File keywords will
not work.")
'())))
-(defun org-mime-build-mail-other-headers (cc bcc)
- "Build mail header from CC and BCC."
+(defun org-mime-build-mail-other-headers (cc bcc from)
+ "Build mail header from CC, BCC, and FROM."
(cond
- ((and cc bcc)
+ ((and cc bcc from)
(list (cons "Cc" cc)
- (cons "Bcc" bcc)))
+ (cons "Bcc" bcc)
+ (cons "From" from)
+ ))
(cc
(list (cons "Cc" cc)))
(bcc
(list (cons "Bcc" bcc)))
+ (from
+ (list (cons "From" from)))
(t
nil)))
@@ -503,6 +508,7 @@ The following file keywords can be used to control the
headers:
#+MAIL_SUBJECT: a subject line
#+MAIL_CC: some2@some.place
#+MAIL_BCC: some3@some.place
+#+MAIL_FROM: sender@some.place
The cursor ends in the TO field."
(interactive)
@@ -520,7 +526,8 @@ The cursor ends in the TO field."
(to (cdr (assoc "MAIL_TO" keywords)))
(cc (cdr (assoc "MAIL_CC" keywords)))
(bcc (cdr (assoc "MAIL_BCC" keywords)))
- (other-headers (org-mime-build-mail-other-headers cc bcc)))
+ (from (cdr (assoc "MAIL_FROM" keywords)))
+ (other-headers (org-mime-build-mail-other-headers cc bcc from)))
(org-mime-compose exported file to subject other-headers nil)
(message-goto-to)))
@@ -543,6 +550,7 @@ Following headline properties can determine the mail
headers,
:MAIL_TO: person1@gmail.com
:MAIL_CC: person2@gmail.com
:MAIL_BCC: person3@gmail.com
+ :MAIL_FROM: sender@gmail.com
:END:
"
(interactive "P")
@@ -562,8 +570,9 @@ Following headline properties can determine the mail
headers,
(to (org-mime-attr "MAIL_TO"))
(cc (org-mime-attr "MAIL_CC"))
(bcc (org-mime-attr "MAIL_BCC"))
+ (from (org-mime-attr "MAIL_FROM"))
;; Thanks to Matt Price improving handling of cc & bcc headers
- (other-headers (org-mime-build-mail-other-headers cc bcc))
+ (other-headers (org-mime-build-mail-other-headers cc bcc from))
(org-export-show-temporary-export-buffer nil)
(subtree-opts (when (fboundp 'org-export--get-subtree-options)
(org-export--get-subtree-options)))
- [nongnu] elpa/org-mime 59bf130c76 113/118: secure tag should be at the beginning of email body, (continued)
- [nongnu] elpa/org-mime 59bf130c76 113/118: secure tag should be at the beginning of email body, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime df99e631c5 031/118: quoted mail use modern UI style, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime e5e4c59022 103/118: fixed some typo, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 3b119a22be 112/118: handle file url on Windows elegantly, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime f7a45f5573 115/118: Upgrade test file to GPLv3, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 77c3f07ce4 046/118: documentation, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime e5c68b1c66 044/118: minor changes to docstrings for readability and style changes., ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime e35c367e7d 048/118: clean code, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 41ea9818b4 050/118: fix cc, bcc compiling error, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 0db41d5b4e 065/118: emergency fix of broken 0.1.4, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 470808cc14 070/118: Added support for MAIL_FROM property,
ELPA Syncer <=
- [nongnu] elpa/org-mime 5132ec0586 089/118: Improve signature separator regex, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 744f5f3315 090/118: Merge pull request #49 from ahttraga/master, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime dc7ae1de85 094/118: Show individual paragraphs in gmail reply quotes, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 85c98739f3 001/118: import original org-mime, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 8d7797ea07 007/118: clean code according to org review, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime b33c96b2d0 015/118: embedded image could use absolute path, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime dd1b9881af 027/118: remove drawers when org-mime-htmlize-subtree at emacs 24.3, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 8067e76eb1 029/118: add documentation on embedded image, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 80b4e3a3b4 008/118: add readme, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime fb265448df 038/118: Merge pull request #14 from unhammer/issue13-OPTIONS-noise, ELPA Syncer, 2022/01/05