private Address [ ] getAddresses ( List < String > strAddresses , String delimiter ) throws OrganizationException { Address [ ] addressArray = new Address [ strAddresses . size ( ) ] ; int count = 0 ; for ( String addr : strAddresses ) { try { addressArray [ count ] = new InternetAddress ( addr ) ; count ++ ; } catch ( Exception e ) { throw new OrganizationException ( "Failed to parse the email address " + addr + ": " + e . getMessage ( ) ) ; } } return addressArray ; }
Convert the delimiter String into Internet addresses with the delimiter of provided