diff --git a/LICENSE b/LICENSE index d703157e..126ceb1a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (C) 2024, Twilio SendGrid, Inc. +Copyright (C) 2025, Twilio SendGrid, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/pom.xml b/pom.xml index dad3a41a..bc9110ad 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ - 2.14.0 + 2.19.0 https://github.com/sendgrid/sendgrid-java @@ -100,7 +100,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.2.4 + 3.6.0 @@ -145,8 +145,8 @@ maven-compiler-plugin 3.8.1 - 1.8 - 1.8 + 21 + 21 @@ -209,7 +209,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.2.4 + 3.6.0 @@ -262,7 +262,7 @@ com.sendgrid java-http-client - 4.5.0 + 4.5.1 com.fasterxml.jackson.core diff --git a/src/main/java/com/sendgrid/helpers/mail/Mail.java b/src/main/java/com/sendgrid/helpers/mail/Mail.java index ea2b9739..7fd9ec4a 100644 --- a/src/main/java/com/sendgrid/helpers/mail/Mail.java +++ b/src/main/java/com/sendgrid/helpers/mail/Mail.java @@ -117,6 +117,10 @@ public class Mail { @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(); static { @@ -505,6 +509,32 @@ 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; } + + /** + * Set the email's reply to list addresses. + * + * @param replyToList a list of reply to address. + */ + public void setReplyTo(List replyToList) { + this.replyToList = 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. *