if (sb.length() > 0) sb.append("; ");
if (sb.length() > 0) sb.append(", ");
    public static String getHeaderAddrs(List<ZEmailAddress> addrs, String type) {        if ( addrs == null) return null;        StringBuilder sb = new StringBuilder();        for (ZEmailAddress addr: addrs) {            if (type != null && addr.getType().equals(type)) {                if (sb.length() > 0) sb.append("; ");                String p = addr.getPersonal();                boolean useP = p!= null && p.length() > 0;                if (useP) sb.append(p);                String a = addr.getAddress();                if (a != null && a.length() > 0) {                    if (useP) sb.append(" <");                    sb.append(a);                    if (useP) sb.append('>');                }            }        }        String result = sb.toString();        return result.length() == 0 ? null : result;     }