Skip to content

Commit

Permalink
#114: added API to add String based recipients with custom recipient …
Browse files Browse the repository at this point in the history
…type
  • Loading branch information
bbottema committed Dec 24, 2017
1 parent 566e0c1 commit e879484
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/main/java/org/simplejavamail/email/EmailPopulatingBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,33 @@ public EmailPopulatingBuilder withRecipientsWithFixedName(@Nullable final String
return withRecipients(fixedName, true, oneOrMoreAddressesEach, recipientType);
}

/**
* Delegates to {@link #withRecipients(String, boolean, Collection, RecipientType)}.
*/
@SuppressWarnings("WeakerAccess")
@Nonnull
public EmailPopulatingBuilder withRecipientsWithDefaultName(@Nullable String name, @Nullable RecipientType recipientType, @Nonnull String... oneOrMoreAddressesEach) {
return withRecipients(name, false, asList(oneOrMoreAddressesEach), recipientType);
}

/**
* Delegates to {@link #withRecipients(String, boolean, Collection, RecipientType)}.
*/
@SuppressWarnings("WeakerAccess")
@Nonnull
public EmailPopulatingBuilder withRecipientsWithFixedName(@Nullable String name, @Nullable RecipientType recipientType, @Nonnull String... oneOrMoreAddressesEach) {
return withRecipients(name, true, asList(oneOrMoreAddressesEach), recipientType);
}

/**
* Delegates to {@link #withRecipients(String, boolean, Collection, RecipientType)}.
*/
@SuppressWarnings("WeakerAccess")
@Nonnull
public EmailPopulatingBuilder withRecipients(@Nullable String name, boolean fixedName, @Nullable RecipientType recipientType, @Nonnull String... oneOrMoreAddressesEach) {
return withRecipients(name, fixedName, asList(oneOrMoreAddressesEach), recipientType);
}

/**
* Delegates to {@link #withRecipient(Recipient)} for each address found in not just the collection, but also in every individual address string.
*
Expand Down

0 comments on commit e879484

Please sign in to comment.