public ReportMailer(MailDestination[] destinations) { this.destinations = destinations; if (destinations.Length == 0) { throw new Exception("dests required"); } foreach (var destination in destinations) { if (MailDestination.RetrieveEndpoint(destination) == null) { throw new Exception("invalid endpoint"); } } }
private static Endpoint CreateEndpoint(MailDestination mailDestination) { throw new Exception("unable to connect to LDAP server"); }
public static Endpoint RetrieveEndpoint(MailDestination origin) { return(CreateEndpoint(origin)); }