Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added support of replyToList in the library #737

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions src/main/java/com/sendgrid/helpers/mail/Mail.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ public class Mail {
/** The email's reply to address. */
@JsonProperty("reply_to")
public Email replyTo;

/** The email's list of reply to addresses. */
@JsonProperty("reply_to_list")
public List<Email> replyToList;

private static final ObjectMapper SORTED_MAPPER = new ObjectMapper();

Expand Down Expand Up @@ -504,6 +508,25 @@ public Email getReplyto() {
public void setReplyTo(Email replyTo) {
this.replyTo = replyTo;
}

/**
* Get the email's reply to list.
*
* @return the reply to list.
*/
@JsonProperty("reply_to_list")
public List<Email> getReplytoList() {
return replyToList;
}

/**
* Add a reply to address to the list.
*
* @param replyTo a reply to address.
*/
public void addReplyTo(Email replyTo) {
this.replyToList = addToList(replyTo, this.replyToList);
}

/**
* Create a string representation of the Mail object JSON.
Expand Down