diff --git a/moto/sesv2/responses.py b/moto/sesv2/responses.py index 84dc36cff..6eb4c1ca7 100644 --- a/moto/sesv2/responses.py +++ b/moto/sesv2/responses.py @@ -46,7 +46,7 @@ class SESV2Response(BaseResponse): source=from_email_address, destinations=destination, subject=content["Simple"]["Subject"]["Data"], - body=content["Simple"]["Subject"]["Data"], + body=content["Simple"]["Body"]["Text"]["Data"], ) elif "Template" in content: raise NotImplementedError("Template functionality not ready") diff --git a/tests/test_sesv2/test_sesv2.py b/tests/test_sesv2/test_sesv2.py index 7f9179d02..bf167597c 100644 --- a/tests/test_sesv2/test_sesv2.py +++ b/tests/test_sesv2/test_sesv2.py @@ -46,6 +46,12 @@ def test_send_email(ses_v1): # pylint: disable=redefined-outer-name sent_count = int(send_quota["SentLast24Hours"]) assert sent_count == 3 + if not settings.TEST_SERVER_MODE: + backend = ses_backends[DEFAULT_ACCOUNT_ID]["us-east-1"] + msg: RawMessage = backend.sent_messages[0] + assert msg.subject == "test subject" + assert msg.body == "test body" + @mock_sesv2 def test_send_raw_email(ses_v1): # pylint: disable=redefined-outer-name