code: private void addAddressHelper(InternetAddressSet set, String address) {
      if (address.contains(",") || address.contains(";")) {
        String[] addresses = address.split("[,;]");
        
        for (String a : addresses) {
          set.add(a);
        }
      }
      else {
        set.add(address);
      }
    }
docs: Checks if the addresses need to be split either on , or ;
  
  @param set Internet address set to add the address to
  @param address address or addresses to add to the given set