[MlMt] Copying a message

Scott A. McIntyre mailmate at howyagoin.net
Sat Oct 27 20:10:34 EDT 2018


Hi Michael,


> I sometimes want to copy a message and paste it into another 
> application (usually OmniOutliner, sometimes a plain-text document) -- 
> basically something similar to what you might expect if you typed 
> command-c when a message is selected in the message list and content 
> was copied to the clipboard so that it can be pasted elsewhere.  I'd 
> like to get both the basic headers (from, to, subject, date) and the 
> body, preferring plain-text formatting.  There doesn't seem to be a 
> built-in MailMate command to do this, unless I'm just overlooking 
> something really obvious.  Is there a way?  Failing that, has anyone 
> implemented anything like this already, perhaps in the form of a 
> bundle?  I looked through https://github.com/mailmate but nothing 
> looks like like it would do it.
>


Since MailMate doesn't have a way to export email to a standard format 
(not a gripe, I understand the headaches that come with that), I've 
solved this sort of thing via one of two paths:

1)  Using the MailMate built-in "Show in Finder" command.  This gives 
you the .eml file.  You can now "do stuff" with that EML file, which may 
suffice.

2)  Increasingly, I've been using Keyboard Maestro to create automation 
flows like you mention above.
	For example, I've created a Macro that is only active in MailMate that 
will select the current message, then select the Show Raw Message 
option.
	From there, Keyboard Maestro copies all of the text into a named 
clipboard (or system clipboard) and then activates Sublime Text.
	KM then pastes into Sublime Text and creates a few variables:  It 
extracts the Subject from the headers, as well as today's date and the 
Date header from the email.
	KM can then save the message and use the variables created in the 
previous step to create a useful filename, saving the file as a .eml to 
a standardised place for my workflows.

The second way is a lot more involved, possibly overkill, but, it does 
permit essentially "one button" activation of a macro that creates a 
file that I can then immediately import into OmniOutliner or anything 
else that reads .eml on macOS.

Not quite the same as a Bundle approach, but, since I've been doing more 
and more with Keyboard Maestro, it was pretty easy to do.

The resulting .eml works fine as an item in OmniOutliner, and clicking 
on it opens the message within the app.

What I haven't really tried to test is how that works with loads of 
attachments -- but, in theory, it should work the same as using the .eml 
file directly from Show In Finder.

Regards,

Scott



More information about the mailmate mailing list