From: Matt Price <moptop99@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: org-mime: improve handling of cc & bcc
Date: Wed, 11 Jan 2017 15:20:56 -0500 [thread overview]
Message-ID: <CAN_Dec8vvEr9yLwRMu=zd-YHLrpC6pr-cKX=aT-PZafdSHSJ+A@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 235 bytes --]
I have been having some trouble with org-mime & mu4e (iv cc & bcc are
empty, then buffer creation fails), and this patch seems to have fixed it.
Not 100% sure that this is really the origin of the problem but it fixed an
issue for me.
[-- Attachment #1.2: Type: text/html, Size: 274 bytes --]
[-- Attachment #2: other-headers-1.patch --]
[-- Type: text/x-patch, Size: 928 bytes --]
diff --git a/contrib/lisp/org-mime.el b/contrib/lisp/org-mime.el
index 2ced42ec8..465fb3416 100644
--- a/contrib/lisp/org-mime.el
+++ b/contrib/lisp/org-mime.el
@@ -257,6 +257,10 @@ otherwise export the entire body."
(to (funcall mp "MAIL_TO"))
(cc (funcall mp "MAIL_CC"))
(bcc (funcall mp "MAIL_BCC"))
+ (other-headers (cond ((and cc bcc) `((cc . ,cc) (bcc . ,bcc)))
+ (cc `((cc . ,cc)))
+ (bcc `((bcc . ,bcc)))
+ (t nil)))
(body (buffer-substring
(save-excursion (goto-char (point-min))
(forward-line 1)
@@ -265,8 +269,7 @@ otherwise export the entire body."
(forward-char))
(point))
(point-max))))
- (org-mime-compose body (or fmt 'org) file to subject
- `((cc . ,cc) (bcc . ,bcc))))))
+ (org-mime-compose body (or fmt 'org) file to subject other-headers))))
(defun org-mime-send-buffer (&optional fmt)
(run-hooks 'org-mime-send-buffer-hook)
next reply other threads:[~2017-01-11 20:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-11 20:20 Matt Price [this message]
2017-01-12 20:00 ` org-mime: improve handling of cc & bcc Nicolas Goaziou
2017-01-12 20:07 ` Kaushal Modi
2017-01-13 1:13 ` Matt Price
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAN_Dec8vvEr9yLwRMu=zd-YHLrpC6pr-cKX=aT-PZafdSHSJ+A@mail.gmail.com' \
--to=moptop99@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).