String emailAddress = null;
GenericValue emailContact = null;
try {
List<GenericValue> emails = delegator.findByAnd("OrderContactMech", UtilMisc.toMap("orderId", orderId, "contactMechPurposeTypeId", "ORDER_EMAIL"));
GenericValue firstEmail = EntityUtil.getFirst(emails);
emailContact = delegator.findOne("ContactMech", UtilMisc.toMap("contactMechId", firstEmail.getString("contactMechId")), false);
emailAddress = emailContact.getString("infoString");
} catch (GenericEntityException e) {
Debug.logWarning(e, "Problems getting order email address", module);
}
// build an shipping address string