Hi,
On this subject - in case people where unaware of the below links on the topics, thought I'd share them.
Also it would be great to collect all these ideas into a single
repo, something I keep failing to do myself!
If anyone else has hints or tips regarding this - I'm really keen to hear them.
I use mu4e as my daily email program, and write rich-text-like emails using org mode.
It works well for code snippets, tables, bullets, etc, but it
took a fair bit of tweaking to get it practically usable and
secure as my day-to-day emailer.
I started following the advice:
https://matt.hackinghistory.ca/2016/11/18/sending-html-mail-with-mu4e/
http://kitchingroup.cheme.cmu.edu/blog/2016/10/29/Sending-html-emails-from-org-mode-with-org-mime/
I keep a (fairly) up-to-date forked version mu with tweaks to make org/html messaging easier taken from here:
https://github.com/titaniumbones/mu/tree/org-mu4e-compose-stabilization
Merged into latest-ish code here:
https://github.com/falloutphil/mu
I also have some other utils to help:
https://github.com/falloutphil/emacs-email
A few other useful techniques I don't have in github yet - I have
lots more, which I write as and when something doesn't work quite
right:
;; this is stolen from John but it didn't work for me until
I
;; made those changes to
mu4e-compose.el
(defun htmlize-and-send
()
"When in an org-mu4e-compose-org-mode message, htmlize
and send
it."
(interactive)
(when (member 'org~mu4e-mime-switch-headers-or-body
post-command-hook)
(org-mime-htmlize)
(org-mu4e-compose-org-mode)
(mu4e-compose-mode)
(message-send-and-exit)))
;; This overloads the amazing C-c C-c commands in org-mode
with one more
function
;; namely the htmlize-and-send,
above.
(add-hook 'org-ctrl-c-ctrl-c-hook 'htmlize-and-send
t)
;; Originally, I set the `mu4e-compose-mode-hook' here,
but
;; this new hook works much, much better for
me.
(add-hook
'mu4e-compose-post-hook
(defun do-compose-stuff
()
"My settings for message
composition."
(org-mu4e-compose-org-mode)))
;; Instead of prefixing we just format the whole quoted
message
;; as verbatim text. This means no characters can be
misinterpreted
;; as org
mark-up.
(defun
message-cite-original-without-signature-wrapped-example
()
"Modified version of
message-cite-original-without-signature.
This function wraps the reply in #+BEGIN_EXAMPLE and
#+END_EXAMPLE.
This prevents anything in the original message being
misconstrued as
mark-up."
(message-cite-original-1
t)
(goto-char
(point))
(insert
"#+BEGIN_EXAMPLE\n")
(goto-char (mark
t))
(insert
"#+END_EXAMPLE"))
(setq mu4e-compose-cite-function
'message-cite-original-without-signature-wrapped-example)
;; Signature in Org - it contains a wrapped HTML
Signature
;; It also includes includes for other org macros, as order
is
not
;; important we can include at the end of the email
message.
(setq mu4e-compose-signature-auto-include
t
mu4e-compose-signature "#+INCLUDE:
\"/home/me/path/to/my/message-settings.org\"")
My message-settings.org looks like this:
# Toggle TeX-like syntax for sub- and
superscripts.
# If you write "^:{}", ‘a_{b}’ will be interpreted, but the
simple ‘a_b’ will be left as it is
(org-export-with-sub-superscripts).
#+OPTIONS:
^:{}
#+OPTIONS: d:MACROS
d:SIGNATURE
:MACROS:
#+INCLUDE:
/home/me/path/to/org-macros/org-macros.setup
:END:
:SIGNATURE:
# @@word: blah@@ means only export the blah when word is
the export
type
# So here when exporting to html (i.e. always when writing
an email), include the following raw
text
@@html:
<html>ADD YOUR STANDARD HTML SIGNATURE
HERE</html>
@@
:END:
--
You received this message because you are subscribed to the Google Groups "mu-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mu-discuss+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mu-discuss/6b9fd6ab-dab9-7df3-9d26-8f4c3529d58d%40beadling.co.uk.
For more options, visit https://groups.google.com/d/optout.
I keep meaning to come back to this thread!
I'm interested and agree - having a single repo (or collection of repos) which implement/configure an org-based usable email system would be really useful.
I can compose messages from an org mode buffer and they look like pretty good when rendered as HTML to the recipient. It's good enough that most the time colleagues who use Outlook cannot tell that I'm not using Outlook.
To reply to any message I always wrap the original message in
BEGIN/END_EXAMPLE tags. This is a cop-out, but it means whatever
format it is in, it renders OK underneath my response in a
readable way. Without this occasionally my emails would render
badly, and it was unusable as a serious system.
I'd too would like a system where when responding I respect the HTML/formatting of the original message.
I'm also interested in tighter integration with Outlook Calendar
too - here I can read my calendar into my org agenda fine (using
excorporate package), but I have no way of booking meetings from
org agenda.
I've also got Skype for Business integrated well into Emacs too -
but that's an even longer story.
All of my lisp code and config is in a haphazard bunch of files,
and mixed up with more mundane emacs config. I need some
motivation to make it all generic and usable by anyone and not
specific to my setup. Over the course of several months I
migrated off Microsoft and onto Emacs so everything was written
bit-by-bit when I had a spare hour or so. So it's a mess.
Phil.
To view this discussion on the web visit https://groups.google.com/d/msgid/mu-discuss/CAN_Dec_Kw%3DQfJLGrQQ2PU0J_tjDTcnK%2BiyXNUWR5ro2dPdsvLg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mu-discuss/e2dce6a7-d851-9d06-903c-169ca931aecb%40beadling.co.uk.