int i = 0;
for (Iterator itr = headerElements.iterator(); itr.hasNext();) {
Map headerObject = (Map) itr.next();
headers[i++] = new Header((String) headerObject.get("name"),
(String) headerObject.get(null));
}
return new Envelope(from, to, date, subject, headers);
}