Products

 

LAYOUT_FRAGMENT:right.template
 
PlexMailVerify
This tools validates and verifies email addresses and mailing lists.

Java Docs

Java Docs API

Price

$85.95

Download

You need JRE 1.4 or newer to use this software. The latest version of JRE can be download from http://java.sun.com/j2se/

License Agreement:

Agree | Decline


Usage

import com.plexobject.mail.*;
import java.io.*;
public class MailTest {
  public static void main(String[] args) {
    if (args.length != 3) {
        System.err.println("Usage: java com.plexobject.mail.EmailValidater 
	white-list-file black-list-file email-address");
        System.exit(0);
    }
    File whiteFile = new File(args[0]);
    File blackFile = new File(args[1]);
    String email = args[2];
    try {
      EmailValidater v = new EmailValidater(whiteFile, blackFile);
      v.setCheckLevel(EmailValidater.VERIFY_SYNTAX | EmailValidater.VERIFY_EMAIL);
      v.validate(email);
      v.saveBlackList(blackFile);
      System.out.println("Email address [" + email + "] is valid");
    } catch (Exception e) {
      System.out.println("Email address [" + email + "] is invalid: " + e);
      //e.printStackTrace();
    }
  }
}

Download MailTest.java