/** * Sets the address source type of all addresses in the collection. * @param source The address source type to apply to all addresses in the collection. */ public void setSource(AddressSource source) { for (NHINDAddress addr : this) addr.setSource(source); }
protected void checkEnvelopeAddresses(NHINDAddressCollection recipients, NHINDAddress sender) { if (recipients == null || recipients.size() == 0) { throw new AgentException(AgentError.NoRecipients); } if (sender == null) { throw new AgentException(AgentError.NoSender); } recipients.setSource(AddressSource.RcptTo); sender.setSource(AddressSource.MailFrom); }