[Users] Saving Messages Outside of Claws Mail
Milan Obuch
claws-mail-users at dino.sk
Sat Jul 17 07:18:54 CEST 2021
On Sat, 17 Jul 2021 10:48:07 +0600, Dustin Miller <dustbiz at gmail.com>
wrote:
> On Thu, 15 Jul 2021 15:10:02 +0200
> Milan Obuch <claws-mail-users at dino.sk> wrote:
>
> > On Thu, 15 Jul 2021 18:37:51 +0600, Dustin Miller
> > <dustbiz at gmail.com> wrote:
> >
> > > I'm looking for an efficient way to save email messages outside of
> > > Claws Mail that will be readable by a text editor or web browser
> > > without a lot of extra noise (i.e. headers, HTML tags, etc.).
> > >
> >
> > Mail headers are easy, just couple of lines at athe message file
> > begin.
> >
> DM: Thanks for your various replies, Milan. For me, when I do a simple
> save of a message, it creates a text file that has quite a bit more
> than a couple of lines for the various header info. Usually I have to
> go down at least a page or so to see what I'm actually interested in,
> the email itself.
Well, yes. Doing 'File->Save email as...' on message I am now replying
to creates a file 9261 bytes long, 186 lines. Extracting headers into
separate file (manually, for now) gives 4609 bytes, 85 lines. It is
easy, however, to decide where the boundary line is - per RFC, first
empty line means end of headers.
> >
> > For HTML tags, some filter is necessary to throw them away and
> > rewrite some tokens.
> >
> DM: Makes sense, but not sure I'm ready to put the time into figuring
> out how to do this. It is possible to save the HTML part of a message
> as an HTML file that opens correctly in a browser, but this doesn't
> include the basic header info that can be nice to have, although I
> guess this could just be included in the file name. If I do a simple
> save of a message with HTML and add '.html' to the end of the file, it
> will open in my browser but just as text, not as HTML. And with either
> approach, I'm still limited to doing one email at a time, rather than
> batches.
Naturally. You can do 'File->Save part as...' on any part of multipart
message. For the HTML part of such a message, saved file most probably
starts with <HTML> and ends with </HTML>. The one I test did. So maybe
it is browser dependent? I opened this file with Opera, it was viewed
as web page, not with <tags> et al. The same result with Luakit.
[ snip ]
> > > The basic idea of what I'm aiming for is to 'convert' a lot of
> > > emails from a status of being Claws Mail messages to a status of
> > > being 'regular' files on my computer that can be opened for easy
> > > reference without needing an email client to open them.
> > >
> > > (As an example, I used a Thunderbird plugin that did batch
> > > exporting to various formats and automatically saved them with a
> > > filename that included the date at the beginning so that the
> > > files would be sortable chronologically. This worked well for me,
> > > since for many emails I could just select a bunch of them, choose
> > > the file format, and point the tool to the folder I wanted them
> > > in, and then move on to the next batch.)
> > >
> >
> > For actions, look in menu Configuration->Actions. Some important
> > items are under 'Infomation' button. For scripting plugin, look at
> > official web site,
> > https://www.claws-mail.org/plugin.php?plugin=python for Python
> > plugin, or google for some examples. If you'd like to try
> > experimental Lua scripting plugin (I am biased, I consider this one
> > the best... *grin*), drop me a line - maybe privately if you choose
> > so.
> DM: Thanks again; I'll keep this post on hand and be in touch if I
> have anymore questions. I appreciate you raising awareness about Lua
> and the related plugin you're developing; don't know much about it,
> but I'm assuming that having another option to the Python plugin will
> be a positive thing overall. :)
I think so as well. Actually, it started when I was no longer able to
build Python plugin anymore for some time and creating new plugin was
surprisingly easy (at first, make it really usefull for more complex
use case and manageable was a bit different).
Regards,
Milan
More information about the Users
mailing list