mirror of
https://github.com/floci-io/floci.git
synced 2026-11-27 07:39:24 -05:00
fix(ses): require a verified sender to send email (#5156)
SendEmail, SendRawEmail and SendTemplatedEmail (v1) and SendEmail (v2)
accepted any Source or FromEmailAddress, so a send from an address that
was never verified succeeded and landed in /_aws/ses. The SendEmail API
Reference says "The message must be sent from a verified email address
or domain", and AWS rejects anything else with MessageRejected.
The send path now checks every address the developer guide names for
this error ("This error could apply to the "From", "Source", "Sender",
or "Return-Path" address"): the Source or FromEmailAddress, the
ReturnPath or FeedbackForwardingEmailAddress and, on a raw message,
every mailbox of its From header, its Sender and its Return-Path
header. A v2 raw send reads the From header only in place of a missing
FromEmailAddress and accepts any From header when one is given
(probe-confirmed), so the header is checked only then. An address
counts as verified when the address itself, its domain or a parent
domain is a verified identity ("if you create and verify an identity
for example.com, you don't need to create separate identities for
a.example.com, a.b.example.com, user@example.com, user@a.example.com").
The error matches AWS: one MessageRejected, "Email address is not
verified. The following identities failed the check in region
US-EAST-1: <address>, <address>", and nothing is captured or relayed.
The check runs after the request's own validation, so the existing
error order is unchanged.
A delegate sender names the owner's identity with SourceArn, FromArn
and ReturnPathArn, their X-SES-SOURCE-ARN, X-SES-FROM-ARN and
X-SES-RETURN-PATH-ARN headers, or v2 FromEmailAddressIdentityArn and
FeedbackForwardingEmailAddressIdentityArn. These are now read (a
parameter wins over its header, and only the first instance of a header
counts), and an address covered by another account's identity ARN is
not checked against the caller's identities. Floci does not evaluate
sending-authorization policies, so it lets such a send through, as it
did before. On a raw send the source ARN also covers the From and
return-path addresses that have no ARN of their own, as SendRawEmail
describes.
Cognito's verification codes and invitations go through SES too, from
Cognito's own no-reply@verificationemail.com or a pool's
EmailConfiguration sender that Cognito has already found verified. They
now use a separate entry point, sendServiceEmail, that skips the check.
Tests and compatibility tests that sent from an unverified address now
verify it first; where a test sent from an address under a domain
identity, the domain is verified by publishing its DKIM records, since
Floci keeps a domain Pending until they exist. SesDomainIdentityTestHelper
does that, and the two copies of the same setup in the configuration-set
tests and the one in SesV2IntegrationTest now use it.
Closes #5141
This commit is contained in:
1 parent
bcda5958e0
commit
0edb6993ce
31 files changed
+1030
-259
No files matched your search
+1
-1
@@ -185,7 +185,7 @@ public final class CognitoMessageDispatcher {
|
||||
|
||||
private void sendEmail(UserPool pool, String region, String email, String subject, String body) {
|
||||
Sender sender = sender(pool, region);
|
||||
ses.sendEmail(SendEmailRequest.builder()
|
||||
ses.sendServiceEmail(SendEmailRequest.builder()
|
||||
.source(sender.from())
|
||||
// SES takes Source as the default return path, the envelope sender it records
|
||||
// and hands to the SMTP relay, which takes a bare address.
|
||||
|
||||
@@ -172,7 +172,12 @@ public class SesIdentityService implements SesTaggable {
|
||||
return refreshIdentityState(identity, region);
|
||||
}
|
||||
|
||||
/** True when the address itself or its parent domain is a verified identity. */
|
||||
/**
|
||||
* True when the address itself, its domain or one of that domain's parents is a verified
|
||||
* identity: "if you create and verify an identity for example.com, you don't need to create
|
||||
* separate identities for a.example.com, a.b.example.com, user@example.com, user@a.example.com".
|
||||
* The walk stops before a bare top-level domain.
|
||||
*/
|
||||
public boolean isVerifiedSender(String fromEmail, String region) {
|
||||
if (fromEmail == null) {
|
||||
return false;
|
||||
@@ -181,8 +186,20 @@ public class SesIdentityService implements SesTaggable {
|
||||
return true;
|
||||
}
|
||||
int at = fromEmail.indexOf('@');
|
||||
return at >= 0 && at < fromEmail.length() - 1
|
||||
&& isIdentityVerified(fromEmail.substring(at + 1), region);
|
||||
if (at < 0 || at == fromEmail.length() - 1) {
|
||||
return false;
|
||||
}
|
||||
String domain = fromEmail.substring(at + 1);
|
||||
while (true) {
|
||||
if (isIdentityVerified(domain, region)) {
|
||||
return true;
|
||||
}
|
||||
int dot = domain.indexOf('.');
|
||||
if (dot < 0 || domain.indexOf('.', dot + 1) < 0) {
|
||||
return false;
|
||||
}
|
||||
domain = domain.substring(dot + 1);
|
||||
}
|
||||
}
|
||||
|
||||
boolean isIdentityVerified(String identity, String region) {
|
||||
|
||||
@@ -271,6 +271,8 @@ public class SesQueryHandler {
|
||||
.bccAddresses(bccAddresses)
|
||||
.replyToAddresses(replyToAddresses)
|
||||
.returnPath(returnPath)
|
||||
.sourceArn(getParam(params, "SourceArn"))
|
||||
.returnPathArn(getParam(params, "ReturnPathArn"))
|
||||
.configurationSetName(configurationSetName)
|
||||
.emailTags(emailTags)
|
||||
.region(region)
|
||||
@@ -295,6 +297,9 @@ public class SesQueryHandler {
|
||||
String messageId = sesService.sendEmail(SendEmailRequest.builder()
|
||||
.source(source)
|
||||
.toAddresses(destinations)
|
||||
.sourceArn(getParam(params, "SourceArn"))
|
||||
.fromArn(getParam(params, "FromArn"))
|
||||
.returnPathArn(getParam(params, "ReturnPathArn"))
|
||||
.configurationSetName(configurationSetName)
|
||||
.emailTags(emailTags)
|
||||
.region(region)
|
||||
@@ -642,6 +647,8 @@ public class SesQueryHandler {
|
||||
.bccAddresses(bccAddresses)
|
||||
.replyToAddresses(replyToAddresses)
|
||||
.returnPath(returnPath)
|
||||
.sourceArn(getParam(params, "SourceArn"))
|
||||
.returnPathArn(getParam(params, "ReturnPathArn"))
|
||||
.configurationSetName(configurationSetName)
|
||||
.emailTags(emailTags)
|
||||
.region(region)
|
||||
|
||||
@@ -108,6 +108,9 @@ public class SesSendController {
|
||||
List<String> replyToAddresses = addressList(request, "ReplyToAddresses");
|
||||
String feedbackForwardingAddress =
|
||||
request.path("FeedbackForwardingEmailAddress").asText(null);
|
||||
// "For Raw emails, the FromEmailAddressIdentityArn value overrides the X-SES-SOURCE-ARN
|
||||
// and X-SES-FROM-ARN headers", so it stands for both ARNs of a raw send.
|
||||
String fromIdentityArn = request.path("FromEmailAddressIdentityArn").asText(null);
|
||||
String configurationSetName = request.path("ConfigurationSetName").asText(null);
|
||||
String tenantName = stringMemberOrAbsent(request, "TenantName");
|
||||
List<MessageTag> emailTags = parseEmailTagsArray(request.path("EmailTags"), "EmailTags");
|
||||
@@ -121,6 +124,9 @@ public class SesSendController {
|
||||
.bccAddresses(bccAddresses)
|
||||
.replyToAddresses(replyToAddresses)
|
||||
.returnPath(feedbackForwardingAddress)
|
||||
.sourceArn(fromIdentityArn)
|
||||
.fromArn(fromIdentityArn)
|
||||
.returnPathArn(request.path("FeedbackForwardingEmailAddressIdentityArn").asText(null))
|
||||
.configurationSetName(configurationSetName)
|
||||
.emailTags(emailTags)
|
||||
.listManagement(listManagement)
|
||||
|
||||
@@ -209,6 +209,10 @@ public class SesService {
|
||||
"tenant", tenantService);
|
||||
}
|
||||
|
||||
private String callerAccountId() {
|
||||
return regionResolver != null ? regionResolver.getAccountId() : defaultAccountId;
|
||||
}
|
||||
|
||||
/**
|
||||
* v2 CreateEmailIdentity. The identity domain builds and persists the complete record in one
|
||||
* write; only the configuration-set existence check is cross-domain, so it is passed in as the
|
||||
@@ -226,7 +230,7 @@ public class SesService {
|
||||
if (identityValue == null || identityValue.isBlank()) {
|
||||
return;
|
||||
}
|
||||
String accountId = regionResolver != null ? regionResolver.getAccountId() : defaultAccountId;
|
||||
String accountId = callerAccountId();
|
||||
tenantService.deleteBackingResource(SesTenantService.RESOURCE_TYPE_IDENTITY, identityValue,
|
||||
region, () -> certificateService.deleteIdentityGuarded(identityValue, accountId, region,
|
||||
() -> doDeleteIdentity(identityValue, region)));
|
||||
@@ -242,9 +246,30 @@ public class SesService {
|
||||
LOG.infov("Deleted identity: {0}", identityValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* The SES send operations: v1 {@code SendEmail}, {@code SendRawEmail} and
|
||||
* {@code SendTemplatedEmail}, and v2 {@code SendEmail}. The Source, the return path and, on a raw
|
||||
* send, every From mailbox the send reads, the Sender and the Return-Path header must be verified
|
||||
* identities, the address itself, its domain or a parent domain, as on AWS. An address that a
|
||||
* sending-authorization ARN puts under another account's identity is not checked.
|
||||
*/
|
||||
public String sendEmail(SendEmailRequest request) {
|
||||
return sendEmail(request, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* A message another service sends to its users, such as a Cognito verification code or
|
||||
* invitation. Its sender is not checked against the account's identities: Cognito's default
|
||||
* sender, {@code no-reply@verificationemail.com}, belongs to an SES account Cognito owns, and a
|
||||
* pool's {@code EmailConfiguration} sender is used only once Cognito has found it verified.
|
||||
*/
|
||||
public String sendServiceEmail(SendEmailRequest request) {
|
||||
return sendEmail(request, false);
|
||||
}
|
||||
|
||||
private String sendEmail(SendEmailRequest request, boolean requireVerifiedSender) {
|
||||
if (request.content() instanceof EmailContent.Raw raw) {
|
||||
return sendRawEmail(request, raw);
|
||||
return sendRawEmail(request, raw, requireVerifiedSender);
|
||||
}
|
||||
if (request.content() instanceof EmailContent.InlineTemplate inline) {
|
||||
requireInlineTemplateContent(inline.subject(), inline.textPart(), inline.htmlPart());
|
||||
@@ -263,9 +288,80 @@ public class SesService {
|
||||
case EmailContent.InlineTemplate inline -> SesTemplateService.render(inline);
|
||||
case EmailContent.Raw raw -> throw new IllegalStateException("Raw content is sent above");
|
||||
};
|
||||
if (requireVerifiedSender) {
|
||||
requireVerifiedSenders(List.of(
|
||||
new SendingAddress(request.source(), request.sourceArn()),
|
||||
new SendingAddress(request.returnPath(), request.returnPathArn())), request.region());
|
||||
}
|
||||
return sendSimpleEmail(request.toBuilder().content(content).build(), content, effectiveConfigSet);
|
||||
}
|
||||
|
||||
/**
|
||||
* An address a send uses as a sender, and the sending-authorization ARN of the identity that
|
||||
* covers it, when the request names one.
|
||||
*/
|
||||
private record SendingAddress(String address, String identityArn) {
|
||||
}
|
||||
|
||||
// "The message must be sent from a verified email address or domain" (API_SendEmail), and the
|
||||
// error "could apply to the "From", "Source", "Sender", or "Return-Path" address" (developer
|
||||
// guide, Email sending errors). It runs after the request's own validation so that
|
||||
// probe-confirmed order is unchanged; where AWS places this check among those errors has not
|
||||
// been probed.
|
||||
private void requireVerifiedSenders(List<SendingAddress> senders, String region) {
|
||||
String accountId = callerAccountId();
|
||||
// A blank address is not used, and neither is the null reverse-path "<>".
|
||||
List<String> unverified = senders.stream()
|
||||
.filter(sender -> sender.address() != null)
|
||||
.filter(sender -> !isAnotherAccountsIdentity(sender.identityArn(), accountId))
|
||||
.map(sender -> extractEmailAddress(sender.address()))
|
||||
.filter(address -> !address.isEmpty())
|
||||
.filter(address -> !identityService.isVerifiedSender(address, region))
|
||||
.distinct()
|
||||
.toList();
|
||||
if (!unverified.isEmpty()) {
|
||||
throw new AwsException("MessageRejected",
|
||||
"Email address is not verified. The following identities failed the check in region "
|
||||
+ region.toUpperCase(Locale.ROOT) + ": " + String.join(", ", unverified), 400);
|
||||
}
|
||||
}
|
||||
|
||||
// Sending authorization: an ARN naming another account's identity puts the address under that
|
||||
// account's identity and policy. Floci evaluates neither, so it lets the delegate through. An
|
||||
// ARN of the caller's own account, or one that names no SES identity, changes nothing.
|
||||
private static boolean isAnotherAccountsIdentity(String identityArn, String accountId) {
|
||||
return AwsArnUtils.resourceIfArnFor(identityArn, "ses")
|
||||
.filter(resource -> resource.startsWith("identity/"))
|
||||
.isPresent()
|
||||
&& AwsArnUtils.isForeignAccount(AwsArnUtils.parse(identityArn), accountId);
|
||||
}
|
||||
|
||||
// A raw send's senders. The From header counts wherever the send reads it: always on v1, and on
|
||||
// v2 only in place of a missing FromEmailAddress (a v2 send with one accepts any From header,
|
||||
// probe-confirmed). An ARN passed as a parameter wins over its X-SES-*-ARN header, and the
|
||||
// source ARN also covers the From and return-path addresses that have no ARN of their own ("If
|
||||
// you only specify the SourceArn, Amazon SES sets the "From" address and the "Return Path"
|
||||
// addresses to the identity that you specified in SourceArn"). AWS names no ARN for the Sender.
|
||||
// Whether AWS still checks a Return-Path header that the request's return path overrides has
|
||||
// not been probed; every address present is checked.
|
||||
private static List<SendingAddress> rawSendingAddresses(SendEmailRequest request, EmailContent.Raw raw,
|
||||
SmtpRelay.RawMessageHeaders headers) {
|
||||
String sourceArn = firstNonBlank(request.sourceArn(), headers.sourceArn());
|
||||
String fromArn = firstNonBlank(request.fromArn(), headers.fromArn(), sourceArn);
|
||||
String returnPathArn = firstNonBlank(request.returnPathArn(), headers.returnPathArn(), sourceArn);
|
||||
List<SendingAddress> senders = new ArrayList<>();
|
||||
senders.add(new SendingAddress(request.source(), sourceArn));
|
||||
if (raw.checksFromHeader(request.hasSource())) {
|
||||
for (String from : headers.fromAddresses()) {
|
||||
senders.add(new SendingAddress(from, fromArn));
|
||||
}
|
||||
}
|
||||
senders.add(new SendingAddress(headers.sender(), null));
|
||||
senders.add(new SendingAddress(request.returnPath(), returnPathArn));
|
||||
senders.add(new SendingAddress(headers.returnPath(), returnPathArn));
|
||||
return senders;
|
||||
}
|
||||
|
||||
private static EmailContent.Simple renderInlineTemplate(EmailContent.InlineTemplate template) {
|
||||
requireInlineTemplateContent(template.subject(), template.textPart(), template.htmlPart());
|
||||
return SesTemplateService.render(template);
|
||||
@@ -420,7 +516,7 @@ public class SesService {
|
||||
return List.copyOf(out);
|
||||
}
|
||||
|
||||
private String sendRawEmail(SendEmailRequest request, EmailContent.Raw raw) {
|
||||
private String sendRawEmail(SendEmailRequest request, EmailContent.Raw raw, boolean requireVerifiedSender) {
|
||||
String source = request.source();
|
||||
String region = request.region();
|
||||
if (raw.data() == null || raw.data().isBlank()) {
|
||||
@@ -469,6 +565,9 @@ public class SesService {
|
||||
}
|
||||
SesAddressSyntax.requireFallbackFromAt(request, raw, parsed.message());
|
||||
SesAddressLength.requireRaw(request, raw, parsed.message());
|
||||
if (requireVerifiedSender) {
|
||||
requireVerifiedSenders(rawSendingAddresses(request, raw, headers), region);
|
||||
}
|
||||
// Resolve suppression before recording the message so a bad ListManagementOptions (e.g. an
|
||||
// unknown contact list) fails the whole send without leaving an orphaned SentEmail record.
|
||||
Map<String, String> suppressedReasons = new LinkedHashMap<>(
|
||||
@@ -570,7 +669,7 @@ public class SesService {
|
||||
Instant timestamp = Instant.now();
|
||||
// Report the caller's account (resolved per request) in the event payload and source ARN,
|
||||
// falling back to the default account outside a request context (e.g. unit tests).
|
||||
String sendingAccountId = regionResolver != null ? regionResolver.getAccountId() : defaultAccountId;
|
||||
String sendingAccountId = callerAccountId();
|
||||
String sourceArn = (source == null || source.isBlank())
|
||||
? null
|
||||
: AwsArnUtils.Arn.of("ses", region, sendingAccountId,
|
||||
@@ -1265,7 +1364,7 @@ public class SesService {
|
||||
* mismatched or the resource doesn't exist anywhere.
|
||||
*/
|
||||
private void requireCallerAccount(ResourceRef ref) {
|
||||
String callerAccountId = regionResolver != null ? regionResolver.getAccountId() : defaultAccountId;
|
||||
String callerAccountId = callerAccountId();
|
||||
if (!ref.account().equals(callerAccountId)) {
|
||||
throw new AwsException("BadRequestException",
|
||||
"Operations on a resource created in a different account is not allowed", 400);
|
||||
|
||||
@@ -69,6 +69,9 @@ public class SmtpRelay {
|
||||
|
||||
private static final String X_SES_PREFIX = "x-ses-";
|
||||
private static final String HEADER_RETURN_PATH = "Return-Path";
|
||||
private static final String HEADER_SOURCE_ARN = "X-SES-SOURCE-ARN";
|
||||
private static final String HEADER_FROM_ARN = "X-SES-FROM-ARN";
|
||||
private static final String HEADER_RETURN_PATH_ARN = "X-SES-RETURN-PATH-ARN";
|
||||
private static final String MESSAGE_ID_DOMAIN = "email.amazonses.com";
|
||||
private static final String DEFAULT_ATTACHMENT_CONTENT_TYPE = "application/octet-stream";
|
||||
|
||||
@@ -681,18 +684,23 @@ public class SmtpRelay {
|
||||
// ──────────────────────────── Raw header parsing ────────────────────────────
|
||||
|
||||
/**
|
||||
* Structured headers extracted from a raw RFC 5322 MIME message: the From address, subject,
|
||||
* separate To / Cc / Bcc address lists, the {@code Return-Path} envelope sender, and the
|
||||
* {@code X-SES-CONFIGURATION-SET} / {@code X-SES-MESSAGE-TAGS} control headers. Empty fields
|
||||
* when the corresponding header is missing.
|
||||
* Structured headers extracted from a raw RFC 5322 MIME message: the first From address, the
|
||||
* subject, separate To / Cc / Bcc address lists, the {@code Return-Path} envelope sender, the
|
||||
* {@code X-SES-CONFIGURATION-SET} / {@code X-SES-MESSAGE-TAGS} control headers, every
|
||||
* mailbox the From header names, the Sender mailbox, and the sending-authorization headers
|
||||
* {@code X-SES-SOURCE-ARN}, {@code X-SES-FROM-ARN} and {@code X-SES-RETURN-PATH-ARN}. Of a
|
||||
* header given more than once, only the first is read, as SES does for the X-headers. Empty
|
||||
* fields when the corresponding header is missing.
|
||||
*/
|
||||
public record RawMessageHeaders(String from, String subject,
|
||||
List<String> to, List<String> cc, List<String> bcc,
|
||||
String returnPath, String configurationSet,
|
||||
List<MessageTag> messageTags) {
|
||||
List<MessageTag> messageTags, List<String> fromAddresses,
|
||||
String sender, String sourceArn, String fromArn,
|
||||
String returnPathArn) {
|
||||
public static RawMessageHeaders empty() {
|
||||
return new RawMessageHeaders("", "", List.of(), List.of(), List.of(),
|
||||
"", "", List.of());
|
||||
"", "", List.of(), List.of(), "", "", "", "");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -748,10 +756,15 @@ public class SmtpRelay {
|
||||
String configurationSet = headerValue(message, HEADER_CONFIGURATION_SET);
|
||||
List<MessageTag> messageTags = parseMessageTagsHeader(
|
||||
headerValue(message, HEADER_MESSAGE_TAGS));
|
||||
Mailbox sender = message.getSender();
|
||||
return new RawMessageHeaders(from.isEmpty() ? "" : from.get(0), subject, to, cc, bcc,
|
||||
returnPath == null ? "" : returnPath,
|
||||
configurationSet == null ? "" : configurationSet,
|
||||
messageTags);
|
||||
messageTags, from,
|
||||
sender == null ? "" : sender.getAddress(),
|
||||
headerValueOrEmpty(message, HEADER_SOURCE_ARN),
|
||||
headerValueOrEmpty(message, HEADER_FROM_ARN),
|
||||
headerValueOrEmpty(message, HEADER_RETURN_PATH_ARN));
|
||||
} catch (Exception ignored) {
|
||||
// A message whose addresses cannot be read is treated like one without headers.
|
||||
return RawMessageHeaders.empty();
|
||||
@@ -807,6 +820,11 @@ public class SmtpRelay {
|
||||
return value.isEmpty() ? null : value;
|
||||
}
|
||||
|
||||
private static String headerValueOrEmpty(Entity entity, String name) {
|
||||
String value = headerValue(entity, name);
|
||||
return value == null ? "" : value;
|
||||
}
|
||||
|
||||
/** Unwraps the {@code <addr@example.com>} form used by Return-Path and friends. */
|
||||
static String extractAngleAddress(String value) {
|
||||
if (value == null) {
|
||||
|
||||
@@ -10,7 +10,9 @@ import java.util.Objects;
|
||||
* controller and Cognito, and rebuilt inside SesService whenever the content is rendered or
|
||||
* sanitized, so the request always carries the content being sent. It is not a wire shape: each
|
||||
* caller translates its own request into these fields (v2 {@code FromEmailAddress} into
|
||||
* {@code source}, {@code FeedbackForwardingEmailAddress} into {@code returnPath}, v1 {@code Tags}
|
||||
* {@code source}, {@code FeedbackForwardingEmailAddress} into {@code returnPath}, v2
|
||||
* {@code FromEmailAddressIdentityArn} into both {@code sourceArn} and {@code fromArn},
|
||||
* {@code FeedbackForwardingEmailAddressIdentityArn} into {@code returnPathArn}, v1 {@code Tags}
|
||||
* into {@code emailTags}, v1 {@code SendRawEmail} {@code Destinations} into {@code toAddresses}),
|
||||
* and a field a caller's API lacks keeps the builder default.
|
||||
*/
|
||||
@@ -21,6 +23,9 @@ public record SendEmailRequest(
|
||||
List<String> bccAddresses,
|
||||
List<String> replyToAddresses,
|
||||
String returnPath,
|
||||
String sourceArn,
|
||||
String fromArn,
|
||||
String returnPathArn,
|
||||
String configurationSetName,
|
||||
List<MessageTag> emailTags,
|
||||
ListManagementOptions listManagement,
|
||||
@@ -70,6 +75,9 @@ public record SendEmailRequest(
|
||||
.bccAddresses(bccAddresses)
|
||||
.replyToAddresses(replyToAddresses)
|
||||
.returnPath(returnPath)
|
||||
.sourceArn(sourceArn)
|
||||
.fromArn(fromArn)
|
||||
.returnPathArn(returnPathArn)
|
||||
.configurationSetName(configurationSetName)
|
||||
.emailTags(emailTags)
|
||||
.listManagement(listManagement)
|
||||
@@ -85,6 +93,9 @@ public record SendEmailRequest(
|
||||
private List<String> bccAddresses = List.of();
|
||||
private List<String> replyToAddresses = List.of();
|
||||
private String returnPath;
|
||||
private String sourceArn;
|
||||
private String fromArn;
|
||||
private String returnPathArn;
|
||||
private String configurationSetName;
|
||||
private List<MessageTag> emailTags = List.of();
|
||||
private ListManagementOptions listManagement;
|
||||
@@ -101,6 +112,9 @@ public record SendEmailRequest(
|
||||
public Builder bccAddresses(List<String> bccAddresses) { this.bccAddresses = bccAddresses; return this; }
|
||||
public Builder replyToAddresses(List<String> replyToAddresses) { this.replyToAddresses = replyToAddresses; return this; }
|
||||
public Builder returnPath(String returnPath) { this.returnPath = returnPath; return this; }
|
||||
public Builder sourceArn(String sourceArn) { this.sourceArn = sourceArn; return this; }
|
||||
public Builder fromArn(String fromArn) { this.fromArn = fromArn; return this; }
|
||||
public Builder returnPathArn(String returnPathArn) { this.returnPathArn = returnPathArn; return this; }
|
||||
public Builder configurationSetName(String configurationSetName) { this.configurationSetName = configurationSetName; return this; }
|
||||
public Builder emailTags(List<MessageTag> emailTags) { this.emailTags = emailTags; return this; }
|
||||
public Builder listManagement(ListManagementOptions listManagement) { this.listManagement = listManagement; return this; }
|
||||
@@ -110,7 +124,8 @@ public record SendEmailRequest(
|
||||
|
||||
public SendEmailRequest build() {
|
||||
return new SendEmailRequest(source, toAddresses, ccAddresses, bccAddresses, replyToAddresses,
|
||||
returnPath, configurationSetName, emailTags, listManagement, tenantName, region, content);
|
||||
returnPath, sourceArn, fromArn, returnPathArn, configurationSetName, emailTags, listManagement,
|
||||
tenantName, region, content);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user