From 1f35330f79a8e315d5c163aeacfbcdce83c8a01d Mon Sep 17 00:00:00 2001 From: Divyam Goel <36486558+DivyamGoel@users.noreply.github.com> Date: Thu, 12 Jan 2023 18:19:44 +0530 Subject: [PATCH] Update Mail.java --- .../java/com/sendgrid/helpers/mail/Mail.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/main/java/com/sendgrid/helpers/mail/Mail.java b/src/main/java/com/sendgrid/helpers/mail/Mail.java index ea2b9739..5afb46ec 100644 --- a/src/main/java/com/sendgrid/helpers/mail/Mail.java +++ b/src/main/java/com/sendgrid/helpers/mail/Mail.java @@ -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 replyToList; private static final ObjectMapper SORTED_MAPPER = new ObjectMapper(); @@ -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 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.