private Builder setAddressList(String fieldName, Address... addresses) { return setAddressList(fieldName, addresses == null ? null : Arrays.asList(addresses)); }
private Builder setAddressList(String fieldName, Address address) { return setAddressList(fieldName, address == null ? null : Collections.singleton(address)); }
private Builder setAddressList(String fieldName, String address) throws ParseException { return setAddressList(fieldName, address == null ? null : DefaultAddressParser.DEFAULT.parseMailbox(address)); }
private Builder setAddressList(String fieldName, String... addresses) throws ParseException { return setAddressList(fieldName, parseAddresses(addresses)); }
/** * Sets <i>Bcc</i> header field of this message to the specified * address. * * @param bcc * address to set or <code>null</code> to remove the header * field. */ public Builder setBcc(Address bcc) { return setAddressList(FieldName.BCC, bcc); }
/** * Sets <i>To</i> header field of this message to the specified * addresses. * * @param to * addresses to set or <code>null</code> or an empty collection * to remove the header field. */ public Builder setTo(Collection<? extends Address> to) { return setAddressList(FieldName.TO, to); }
/** * Sets <i>To</i> header field of this message to the specified * address. * * @param to * address to set or <code>null</code> to remove the header * field. */ public Builder setTo(Address to) { return setAddressList(FieldName.TO, to); }
/** * Sets <i>Reply-To</i> header field of this message to the specified * addresses. * * @param replyTo * addresses to set or <code>null</code> or no arguments to * remove the header field. */ public Builder setReplyTo(Address... replyTo) { return setAddressList(FieldName.REPLY_TO, replyTo); }
/** * Sets <i>Cc</i> header field of this message to the specified * address. * * @param cc * address to set or <code>null</code> to remove the header * field. */ public Builder setCc(Address cc) { return setAddressList(FieldName.CC, cc); }
/** * Sets <i>To</i> header field of this message to the specified * addresses. * * @param to * addresses to set or <code>null</code> or no arguments to * remove the header field. */ public Builder setTo(String... to) throws ParseException { return setAddressList(FieldName.TO, to); }
/** * Sets <i>Reply-To</i> header field of this message to the specified * address. * * @param replyTo * address to set or <code>null</code> to remove the header * field. */ public Builder setReplyTo(Address replyTo) { return setAddressList(FieldName.REPLY_TO, replyTo); }
/** * Sets <i>Bcc</i> header field of this message to the specified * addresses. * * @param bcc * addresses to set or <code>null</code> or an empty collection * to remove the header field. */ public Builder setBcc(Collection<? extends Address> bcc) { return setAddressList(FieldName.BCC, bcc); }
/** * Sets <i>Cc</i> header field of this message to the specified * addresses. * * @param cc * addresses to set or <code>null</code> or an empty collection * to remove the header field. */ public Builder setCc(Collection<? extends Address> cc) { return setAddressList(FieldName.CC, cc); }
/** * Sets <i>Reply-To</i> header field of this message to the specified * addresses. * * @param replyTo * addresses to set or <code>null</code> or an empty collection * to remove the header field. */ public Builder setReplyTo(Collection<? extends Address> replyTo) { return setAddressList(FieldName.REPLY_TO, replyTo); }
/** * Sets <i>To</i> header field of this message to the specified * addresses. * * @param to * addresses to set or <code>null</code> or no arguments to * remove the header field. */ public Builder setTo(Address... to) { return setAddressList(FieldName.TO, to); }
/** * Sets <i>To</i> header field of this message to the specified * address. * * @param to * address to set or <code>null</code> to remove the header * field. */ public Builder setTo(String to) throws ParseException { return setAddressList(FieldName.TO, to); }
/** * Sets <i>Bcc</i> header field of this message to the specified * addresses. * * @param bcc * addresses to set or <code>null</code> or no arguments to * remove the header field. */ public Builder setBcc(Address... bcc) { return setAddressList(FieldName.BCC, bcc); }
/** * Sets <i>Cc</i> header field of this message to the specified * addresses. * * @param cc * addresses to set or <code>null</code> or no arguments to * remove the header field. */ public Builder setCc(Address... cc) { return setAddressList(FieldName.CC, cc); }