MailUtilities     HOME    SOLUTIONS    PRESS ROOM    FOR PARTNERS    SEARCH/SITEMAP    SUPPORT
Products Products
 • Advanced Email Extractor
Plugins:
WebForm Authorization
USA Geo Search
Fax Search
Employers Search
MetaTags Explorer
LDAP Plugin

 • Advanced Direct Remailer
 • High Speed Verifier
 • Advanced Maillist Verify
 • Mailing List Wizard
 • Advanced Email Locator
 • Advanced Maillist Manager
 • Adv. Attachments Processor
 • Adv. Mailbox Processor

 • Advanced Email Parser


Outlook Express Utilities
 • Email Extractor
 • Email Address Extractor
 • Attachments Extractor

Outlook Utilities
 • Email Extractor
 • Email Address Extractor
 • Attachments Extractor

Eudora Utilities
 • Email Extractor
 • Email Address Extractor
 • Attachments Extractor

Incredimail Utilities
 • Email Extractor
 • Email Address Extractor
 • Attachments Extractor

Downloads Downloads
Purchase Purchase
Free services Free services
Our newsletters Our newsletters
Support Support
Anti-Spam policy Anti-Spam policy






Search Google





Using JScript in AEE 
AEE Home •
What's new in current version •

What are email extractors for? •
Differences between AEE editions •
»  Using JScript in AEE (Pro and Premium Edition) «
AEE plugins technology •

Set of search engines •
Suggest new search engine / Report dead •

Download AEE now •

Order full version of AEE •
(new!!!) Volume discounts •

AEE scripting technology

Note, that this option is available in Professional and Premium edition of AEE only. To configure JScript, choose "JScript" tab in Advanced Email Extractor settings. You can open the settings window through the program menu.

JScript Options

Getting Familiar with JScript

JScript is a powerful programming language that supports COM/ActiveX automation. From JScript you can deal with MS Excel documents, MS Access databases and other widely used applications that support COM/ActiveX technology. To learn more about the language, see examples and download the language documentation, visit Microsoft web site.

In AEE, JScript program is used to "approve" e-mail address. If the address meets all the requirements defined in AEE settings, JScript is to say the last desisive word - whether to add the address to the list of addresses found or not. To make the decision, it can, for example, check the address through Advanced Maillist Verify, compare the mailbox and/or the mailbox domain to the list of mailboxes/domains needed in the program itself or in an external source (e.g., in a MS Excel document).

 

JScript Objects

Advanced Email Extractor extends the JScript name space with an object named aee that contains the following properties and methods:

Name Type Description
Email Property. Read-only. Container of e-mail address to be approved. Contains e-mail address only, without its owners name.
Mailbox Property. Read-only. Contains mailbox of the address. E.g. if the address is john@mail.com, mailbox is john.
Domain Property. Read-only. E-mail address domain. E.g. if the address is john@mail.com, domain is mail.com.
Owner Property. Read-only. E-mail address owner's name; can be an empty string. E.g., if the address is "J.Smith" <john@mail.com>, this property value will be J.Smith.
SourceUrl Property. Read-only. URL of the web-page where the E-mail address was extracted from.
Approve Method. If this method is not invoked during the script running, e-mail address will not be "approved" and will not be added to the list of addresses found.

 

Limitations

Please note that JScript program is executed for each new address found. If your program is using "heavy" ActiveX objects, this might result in serious performance problems due to tough usage of CPU resources and to insufficient RAM available. As addresses found are being processes one by one in one stream, use of slow objects and agorythm might affect scan speed negatively.

Please note that creating ActiveX components from script is not permitted in unregistered copy of AEE.

 

Program Examples

Example 1. A program that doesn't allow adding addresses with mailboxes postmaster, webmaster and info to the list.

var vMailBox = aee.Mailbox;
vMailBox = vMailBox.toLowerCase();
if (vMailBox != "webmaster" &&
    vMailBox != "postmaster" &&
    vMailBox != "info")
{
    aee.Approve();
}

Example 2. A program that doesn't allow addings addresses that contain the word SPAM in the owner's name, e-mail address or web-page address. Regular expression is used for keyword search.

var re = /spam/i;
var s = aee.Email + " " +
        aee.SourceUrl + " " +
        aee.Owner;
if (s.match(re) == null) aee.Approve();

Example 3. A program approves only addresses with mail domains listed in C:\domains.txt file. The example will work in registered Advanced Email Extractor copy. Also, domains.txt file of the following format must be created in the root directory on C:

mail.com
aol.com
email.com
microsoft.com
altavista.net

Each string must contain only one domain, with no spaces or tabs around. With the data file shown above, the program will approve addresses test@mail.com, john@aol.com etc.

Program code:

var fs, f, s, domain;

fs = new ActiveXObject("Scripting.FileSystemObject");
f = fs.OpenTextFile("C:\\domains.txt", 1);
domain = aee.Domain;
domain = domain.toLowerCase();

while (!f.AtEndOfStream)
{
   s = f.ReadLine();   
   if (s == domain)
   {
       aee.Approve();
       break;
   }
}

f.Close();

Example 4. A program approves only actually existing addresses. Address is checked with Advanced Maillist Verify, you must have version 3.0 or newer. The example will work only in registered copy of Advanced Email Extractor. Please note that checking an address will take up to one minute, Advanced Email Extractor will freeze during the check; the program will not approve addresses which check failed (e.g., recipient's mail server was unavailable), though they might exist.

var st, amv;

amv = new ActiveXObject('AdvancedMaillistVerify.EmailVerifier');
if (amv)
{
    amv.Email = aee.Email;
    do
    {	
 	st = amv.Status; 
	amv.Sleep = 300;
     }
    while (st != 3);

    if (amv.Result == 0)
    {
       // Email is exist
       aee.Approve();
    }
    amv = "";
}

Example 5. The program checks whether there is such address in D:\list.xls document, adds new addresses into the document and approves them. The example will work provided document D:\list.xls exists, Microsoft Excel is installed on the computer and Advanced Email Extractor copy is registered.

var f = "D:\\list.xls";

var xl = new ActiveXObject("Excel.Application");
if(xl)
{
  var wb = xl.Workbooks.Open(f);
  if(wb)
  {
    var ws = wb.Worksheets(1);
    var item = ws.Columns(1).Find(aee.Email);
    if(!item)
    {
        var cnt = ws.Rows.Count;
        var idx = 1;
        while(idx < cnt)
        {
           if(ws.Cells(idx, 1).Value == null) break;
           idx++;
         }
         ws.Cells(idx, 1) = aee.Email;
         aee.Approve();
    }
    wb.Close(true);
  }
}

Example 6. How to add only Spanish (.es) emails to list? Btw, Advanced Email Locator is a better choise in this case.

if(aee.Domain.substring(aee.Domain.length-3,aee.Domain.length)=='.es') aee.Approve();

Example 7. How to add emails from Spanish sites (.es) only to list?

if(aee.SourceUrl.match('.es/')!=null ) aee.Approve();


 Announcements 







You must authorize to reach technical support.
Copyright © 1999-2007 MailUtilities.Com All rights reserved.