Skip to content

Instantly share code, notes, and snippets.

@michaelfeathers
Created January 21, 2013 21:48
Show Gist options
  • Save michaelfeathers/4589787 to your computer and use it in GitHub Desktop.
Save michaelfeathers/4589787 to your computer and use it in GitHub Desktop.
Vector vList = new Vector(10);
BufferedReader listFile = new BufferedReader(new FileReader(emailListFile));
String line = null;
while ((line = listFile.readLine()) != null) {
vList.addElement(new InternetAddress(line));
}
listFile.close();
if (ls.debugOn)
log.put(new Date() + "> " + "Found " + vList.size() + " email ids in list");
ls.toList = new InternetAddress[vList.size()];
vList.copyInto(ls.toList);
vList = null;
Properties sysProperties = System.getProperties();
Session session = Session.getDefaultInstance(sysProperties, null);
session.setDebug(ls.debugOn);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment