Topic: Extracting Email Addresses (1 of 14), Read 63 times, 1 File Attachment
Conf: VEDIT Macro Library
From: Ian Binnie
Date: Saturday, March 18, 2006 06:24 PM

I have completed my EmailFromTo.vdm

This extracts e-mail Addresses & Display-Names from e-mail files ("From:" addresses).
It only finds addresses with "My e-mails" in To: or Cc:
Skips e-mail Addresses in "My Senders" list
Sorts addresses and remove duplicate Address/Name entries.

This macro should work with any MIME Email files.
It includes code to skip the body of multipart MIME, to minimise spurious hits in forwarded attachments.

There are 4 Output Options (depends on value of #103):-
0 Addresses & Display-Names with one of "My e-mails" in To: or Cc:
1 All Addresses & Display-Names
2 Address, Display-Name & To:/Cc: if one of "My e-mails" in To: or Cc:
3 All Addresses, Display-Names & To:/Cc: with one of "My e-mails"

Output can be imported into Excel for further filtering.

Option 1 is equivalent to my EmailSender macro (although it does more work to get there), and has fixed a couple of bugs.

For example, on my email Option 0 produces 320 hits,
Option 1 448 (there are some duplicate addresses where Display-Names are omitted or missing).
E-email.vdm outputs 566 addresses

 
EMAILFROMTO.VDM (8KB)

 


Topic: Re: Extracting Email Addresses (2 of 14), Read 55 times
Conf: VEDIT Macro Library
From: Ted Green
Date: Sunday, March 19, 2006 10:23 AM

At 06:25 PM 3/18/2006, you wrote:
>I have completed my EmailFromTo.vdm

I plan to add your macro to VEDIT version 6.20 next month. Several
other recently written macros (UTF-8, etc) will also be added.

I plan to finalize 6.15 this week and "release" it as the last 6.1x.

Ted.

 


Topic: Re: Extracting Email Addresses (3 of 14), Read 56 times
Conf: VEDIT Macro Library
From: Ian Binnie
Date: Sunday, March 19, 2006 05:19 PM

On 3/19/2006 10:23:16 AM, Ted Green wrote:
>At 06:25 PM 3/18/2006, you
>wrote:
>>I have completed my EmailFromTo.vdm
>
>I plan to add your macro to
>VEDIT version 6.20 next month.
>Several
>other recently written macros
>(UTF-8, etc) will also be
>added.
>
>I plan to finalize 6.15 this
>week and "release" it as the
>last 6.1x.
>
>Ted.
>
>
>

Thanks,

Have you given any thought to an executable only version of Vedit I suggested some months ago.

It would be good to be able to enable others to use my macros.

 


Topic: Re: Extracting Email Addresses (4 of 14), Read 61 times
Conf: VEDIT Macro Library
From: Ted Green
Date: Sunday, March 19, 2006 09:03 PM

At 05:19 PM 3/19/2006, you wrote:
>Have you given any thought to an executable only version of Vedit I suggested some months ago.
>It would be good to be able to enable others to use my macros.

I am not ready to do that yet. I have been thinking about a freeware version of VEDIT and exactly what it should contain, how to support it, etc.

Ted.

 


Topic: Re: Extracting Email Addresses (5 of 14), Read 63 times
Conf: VEDIT Macro Library
From: Pauli Lindgren
Date: Monday, March 27, 2006 10:32 AM

On 3/19/2006 9:03:00 PM, Ted Green wrote:
>
>I am not ready to do that yet.
>I have been thinking about a freeware version of VEDIT and
>exactly what it should contain, how to support it, etc.

A freeware version of Vedit, with limited functionality, would be one possibility. Or, you could have a version that would only work in browse mode.

But how about a runtime package that would allow running macros, but would not contain any user interface? That would be significantly smaller in size. At least smaller than the DOS version. (If I understand it correctly, the larger size of Windows version is only because of the user interface. And DOS version has user interface, too.)

Another thing related to the subject: could it be possible to have an option to compile macros, so that the end user would not see the source code?

--
Pauli

 


Topic: Re: Extracting Email Addresses (6 of 14), Read 69 times
Conf: VEDIT Macro Library
From: Ted Green
Date: Monday, March 27, 2006 11:06 AM

At 10:32 AM 3/27/2006, you wrote:
>A freeware version of Vedit, with limited functionality, would be one possibility. Or, you could have a version that would only work in browse mode.
>
>But how about a runtime package that would allow running macros, but would not contain any user interface? That would be significantly smaller in size. At least smaller than the DOS version. (If I understand it correctly, the larger size of Windows version is only because of the user interface. And DOS version has user interface, too.)

Pauli:

If I create a "runtime only" version of VEDIT, I will simply disable parts of VEDIT. Removing them from the executable would be too much work.
Also, macros still need dialog boxes.

Ted.

 


Topic: Extracting Email Addresses (7 of 14), Read 44 times
Conf: VEDIT Macro Library
From: Peter Rejto
Date: Saturday, October 07, 2006 06:19 PM

On 3/18/2006 6:24:59 PM, Ian Binnie wrote:
>I have completed my
>EmailFromTo.vdm
>
>This extracts e-mail Addresses
>& Display-Names from e-mail
>files ("From:" addresses).
>It only finds addresses with
>"My e-mails" in To: or Cc:
>Skips e-mail Addresses in "My
>Senders" list
>Sorts addresses and remove
>duplicate Address/Name
>entries.

Thanks Ian.

I just tried your macro and I had only partial success.
Specifically, I had to set the value 3 in the numeric register #103. In this case I had one hit.

I have a hunch that your macro just did what it was supposed to do.

In any case, I have an e-mail message, which has several
comma separated items after the "To:" statement.
Of course, I would like to retrieve all of them.

I also checked my format and it said:

This is a multi-part message in MIME format.


Looking forward to hearing from you.

Thanks,

-peter.

 


Topic: Extracting Email Addresses (8 of 14), Read 44 times
Conf: VEDIT Macro Library
From: Ian Binnie
Date: Saturday, October 07, 2006 10:17 PM

On 10/7/2006 6:19:33 PM, Peter Rejto wrote:
>On 3/18/2006 6:24:59 PM, Ian Binnie
>wrote:
>>I have completed my
>>EmailFromTo.vdm
>>
>>This extracts e-mail Addresses
>>& Display-Names from e-mail
>>files ("From:" addresses).
>>It only finds addresses with
>>"My e-mails" in To: or Cc:
>>Skips e-mail Addresses in "My
>>Senders" list
>>Sorts addresses and remove
>>duplicate Address/Name
>>entries.
>

>I just tried your macro and I had only
>partial success.
>Specifically, I had to set the value 3
>in the numeric register #103. In this
>case I had one hit.

Peter, you need to customise the macro to include a list of "My e-mails". The macro is designed to extract ONLY email with one of these in To: or Cc:


>
>I have a hunch that your macro just did
>what it was supposed to do.
>
>In any case, I have an e-mail message,
>which has several
>comma separated items after the "To:"
>statement.
>Of course, I would like to retrieve all
>of them.

The macro is designed explicitly NOT to extract these addresses, the To: is used only as a filter.
The addresses extracted are in the From: field

Option 3 still outputs the From: address, but includes the matched value of the To: or Cc: address.


It might be possible to extract all To: addresses by changing the 2 lines which search for From: to To:

I haven't tested this, and it may mess up file pointers.

Another option may be to modify the following code (which is where the address matching happens) to output ALL addresses.

// Search To: email address
repeat(ALL)
{
reg_empty(28)
Search_Block("[a-zA-Z0-9\_\-\.]+@[a-zA-Z0-9\_\-\.]+\.[a-zA-Z][a-zA-Z]+",#25,#26,REGEXP+MAX+ADVANCE+ERRBREAK)
Reg_Copy_Block(28, CP-Chars_Matched, CP) // Copy e-mail address to T-Reg
Buf_Switch(#28) // working buffer with "My e-mails" list
if (Search(@(28),BEGIN|SIMPLE|NOERR) ) { Break } // Found
Buf_Switch(#20) // Return to original Edit Buffer
}

 


Topic: Extracting Email Addresses (9 of 14), Read 44 times
Conf: VEDIT Macro Library
From: Peter Rejto
Date: Sunday, October 08, 2006 10:37 AM

On 10/7/2006 10:17:38 PM, Ian Binnie wrote:


Thanks Ian,

>The macro is designed explicitly NOT to
>extract these addresses, the To: is used
>only as a filter.
>The addresses extracted are in the From:
>field
>
>Option 3 still outputs the From:
>address, but includes the matched value
>of the To: or Cc: address.
>

I believe that I could handle this part. I just
replaced the search string "From:" by the search string
"To:" In other words, I have followed the instructions that came with your macro.

>Another option may be to modify the
>following code (which is where the
>address matching happens) to output ALL
>addresses.
>
> // Search To: email address
> repeat(ALL)
> {
> reg_empty(28)
>Search_Block("[a-zA-Z0-9\_\-\.]+@[a-zA-Z
>0-9\_\-\.]+\.[a-zA-Z][a-zA-Z]+",#25,#26,
>REGEXP+MAX+ADVANCE+ERRBREAK)
>Reg_Copy_Block(28, CP-Chars_Matched, CP)
>// Copy e-mail address to T-Reg
>Buf_Switch(#28) // working buffer with
>"My e-mails" list
>if (Search(@(28),BEGIN|SIMPLE|NOERR) ) {
>Break } // Found
>Buf_Switch(#20) // Return to original
>Edit Buffer
> }

I have tried this suggestion and I believe that I am pretty close to success. Specifically, I highlighted your Search_Block(...)command, pressed Ctr-C, back to my e-mail file, ESC, Command Mode, and pressed Ctr-V. Then I went back to my e-mail file. Now the result. Your command,

DID MOVE THE CURSOR TO THE NEXT E-MAIL ADDRES !

At present I just do not know how to put the pieces together.

Thanks again,

-peter.

 


Topic: Extracting Email Addresses (10 of 14), Read 54 times
Conf: VEDIT Macro Library
From: Ian Binnie
Date: Sunday, October 08, 2006 09:10 PM

On 10/8/2006 10:37:26 AM, Peter Rejto wrote:
>
>I have tried this suggestion and I
>believe that I am pretty close to
>success. Specifically, I highlighted
>your Search_Block(...)command, pressed
>Ctr-C, back to my e-mail file, ESC,
>Command Mode, and pressed Ctr-V. Then I
>went back to my e-mail file. Now the
>result. Your command,
>
>DID MOVE THE CURSOR TO THE NEXT E-MAIL
>ADDRES !
>
>At present I just do not know how to put
>the pieces together.

Peter,

This loop steps through the To: list checking each entry against My Emails, until it finds a match.

I could suggest several options.
One would be to flag a match, then introduce a copy of the loop without checking to output each address.

Of course it depends on what you want to do.
If it is just to extract the To: list, just copy the block, then run one of the standard Vedit extract email macros.

 


Topic: Extracting Email Addresses (11 of 14), Read 54 times
Conf: VEDIT Macro Library
From: Peter Rejto
Date: Monday, October 09, 2006 12:50 AM

On 10/8/2006 9:10:57 PM, Ian Binnie wrote:

>If it is just to extract the To: list,
>just copy the block, then run one of the
>standard Vedit extract email macros.


Thanks Ian,

That is exactly that I want to do.

My problem is that I do not know the

"standard Vedit extract email macros."

Could you please help me with these standard
macros?

Thanks again,

-peter.

 


Topic: Extracting Email Addresses (12 of 14), Read 53 times
Conf: VEDIT Macro Library
From: Ian Binnie
Date: Monday, October 09, 2006 03:04 AM

On 10/9/2006 12:50:53 AM, Peter Rejto wrote:
>On 10/8/2006 9:10:57 PM, Ian Binnie
>wrote:
>
>>If it is just to extract the To: list,
>>just copy the block, then run one of the
>>standard Vedit extract email macros.
>
>
>Thanks Ian,
>
>That is exactly that I want to do.
>
>My problem is that I do not know the
>
>"standard Vedit extract email macros."
>
>Could you please help me with these
>standard
>macros?
>

Vedit comes with 2 macros

E-EMAIL- Extract all "From:" and "Reply-to: e-mail addresses from an e-mail archive file, sort them and remove duplicates. Works well with Eudora .MBX files.

Note: This macro works well for extracting e-mail addresses from an e-mail archive file which contains many useless routing addresses. Use E-XTRACT.VDM to extract all e-mail addresses from a data file.

E-XTRACT- Extract all e-mail addresses from a file, sort them and remove duplicates.

Note: This macro works well for extracting e-mail addresses from a database file. Do not use it with e-mail archive files or you will get many useless routing addresses; use E-EMAIL.VDM instead.

These work quite well, but also include addresses in embedded or forwarded messages.

I wrote my macros because I wanted a list of addresses which have emailed directly to me.
(I get a lot of mail from mail lists etc which use Bcc:)

 


Topic: Extracting Email Addresses (13 of 14), Read 59 times
Conf: VEDIT Macro Library
From: Peter Rejto
Date: Monday, October 09, 2006 11:33 AM

Thanks Ian,

I looked in my macros directory and sure enough I found these macros there. They work like a charm for me.

My problem was that I have looked in the Vedit On line Help, under supplied macros and they were not listed there.

At the same time, I enjoyed experimenting with your macro. I have learned quite a bit from it!

>(I get a lot of mail from mail lists etc which use Bcc:)

Special thanks for this information. Now I understand the problem you were after.

-peter

 


Topic: Extracting Email Addresses (14 of 14), Read 18 times, 1 File Attachment
Conf: VEDIT Macro Library
From: Ian Binnie
Date: Wednesday, October 03, 2007 04:25 AM

I have enhanced my EmailFromTo.vdm

This extracts e-mail Addresses & Display-Names from e-mail files ("From:" addresses).
It only finds addresses with "My e-mails" in To: or Cc:
Skips e-mail Addresses in "My Senders" list
Extract Origination Date for "My e-mails", and skips "old" messages
Sorts addresses and remove duplicate Address/Name entries.

I had a version which skipped dates before a cutoff and recently wrote one to extract the senders IP Address.
I decided to combine all these into one macro, with options.

You need to customise this macro to your specific requirements where indicated by <============
(The default settings will output all email addresses - unless you are "bill_gates@...")

This macro should work with any MIME Email files.
It includes code to skip the body of multipart MIME, to minimise spurious hits in forwarded attachments.

There are 4 Main Output Options (depends on value of #103):-
0 Addresses & Display-Names with one of "My e-mails" in To: or Cc:
1 All Addresses & Display-Names
2 Address, Display-Name & To:/Cc: if one of "My e-mails" in To: or Cc:
3 All Addresses, Display-Names & To:/Cc:

(Options 1 & 3 bypass the "My e-mails" filtering and output addresses with no To:/Cc:)

Additional Output Options (add the following value/s to the above in #103 e.g. 2+4):-
4 IP Address
8 Origination Date & Time

Obviously adding these makes the output much larger, but is useful for analysis.

 
EMAILFROMTO(1).VDM (11KB)