/** * Gets the list of emails each one separated by a comma. * * @return the list of emails each one separated by a comma. */ public String getEmailsSeparatedByComma() { String comma = ","; StringBuilder sb = new StringBuilder(30 * size()); for (MailAddress mailAddress : this) { if (sb.length() > 0) { sb.append(comma); } sb.append(mailAddress.getEmail()); } return sb.toString(); }
/** * Sets one or more TO address. Address may be specified with personal name like this: <code> * "Jenny Doe <[email protected]></code>. */ public Email to(String[] tos) { setTo(MailAddress.createFrom(tos)); return this; }
/** Sets one or more BCC addresses. */ public Email bcc(String[] bccs) { setBcc(MailAddress.createFrom(bccs)); return this; }
/** Sets one or more BCC addresses. */ public Email bcc(InternetAddress[] bccs) { setBcc(MailAddress.createFrom(bccs)); return this; }
/** Sets one or more CC address. */ public Email cc(InternetAddress[] ccs) { setCc(MailAddress.createFrom(ccs)); return this; }
/** * Sets one or more CC address. Address may be specified with personal name like this: <code> * "Jenny Doe <[email protected]></code>. */ public Email cc(String[] ccs) { setCc(MailAddress.createFrom(ccs)); return this; }
/** Sets one or more REPLY-TO address. */ public Email replyTo(InternetAddress[] replyTos) { setReplyTo(MailAddress.createFrom(replyTos)); return this; }
/** * Sets one or more REPLY-TO address. Address may be specified with personal name like this: * <code>"Jenny Doe <[email protected]></code>. */ public Email replyTo(String[] replyTos) { setReplyTo(MailAddress.createFrom(replyTos)); return this; }
/** Sets one or more TO addresses. */ public Email to(InternetAddress[] tos) { setTo(MailAddress.createFrom(tos)); return this; }