Skip to content

Commit b014e90

Browse files
committed
test(ses): unverified v2 sender returns MessageRejected in verification-gate e2e
1 parent 7f686a7 commit b014e90

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

crates/fakecloud-e2e/tests/ses_verification_gate.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,10 @@ async fn sandbox_rejects_unverified_sender() {
223223
let client = server.sesv2_client().await;
224224
set_sandbox(&server, true).await;
225225

226-
// No identities at all — the From-address gate must trip with the
227-
// dedicated `MailFromDomainNotVerifiedException` SES uses for v2.
226+
// No identities at all — the From-address gate must trip. AWS SES returns
227+
// `MessageRejected` ("Email address is not verified...") for an unverified
228+
// sender on both v1 and v2; `MailFromDomainNotVerifiedException` is reserved
229+
// for a configured-but-unverified custom MAIL FROM domain.
228230
let err = client
229231
.send_email()
230232
.from_email_address("noreply@unverified.test")
@@ -253,8 +255,8 @@ async fn sandbox_rejects_unverified_sender() {
253255

254256
let dbg = format!("{err:?}");
255257
assert!(
256-
dbg.contains("MailFromDomainNotVerified"),
257-
"expected MailFromDomainNotVerifiedException, got: {dbg}"
258+
dbg.contains("MessageRejected"),
259+
"expected MessageRejected, got: {dbg}"
258260
);
259261
}
260262

0 commit comments

Comments
 (0)