Re: [Evolution] Can I extract email addresses from emails?
- From: guenther <guenther rudersport de>
- To: Peter Stokes <peter ashlyn co uk>
- Cc: evolution lists ximian com
- Subject: Re: [Evolution] Can I extract email addresses from emails?
- Date: Thu, 04 Sep 2003 18:50:28 +0200
Just to confirm I am a newbie to the list, so apologies if this is one
of those 'answered that 10 times already' mails.
Anyway, I have various folders of emails which have come from
customers/contacts and I wanted to 'scan' the emails and extract email
addresses from the text and the headers and put them into a file.
Under Outlook this is possible via an additional 3rd party app which
scans the pst file. Is there a way of doing this with Evolution?
Nope, not with Evolution -- but with 3rd party apps. ;-)
As Evolution stores mails by default in mbox format, it is pretty easy
to scan them for contained email addresses. (Yes, this is plain text,
unlike the .pst files...) I don't know about any app that does this,
though.
However, just started playing with this topic, as I got curious. This
perl one-liner does the trick pretty well -- although it will catch
unwanted header infos (like Message-Id:) as well, if it looks like a
valid email address.
$ perl -ne 'print "$1\n" while ( s/([\w.-]+@([\w-]+\.)+\w{2,})// )' ~/evolution/local/Inbox/mbox
Dunno, if this will help, but it was at least fun for a couple of
minutes for me... ;-)
...guenther
--
char *t="\10pse\0r\0dtu\0 ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]