Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[9.x] Bug fix: Use correct parameters to send email through SES via SesV2Client #37881

Merged
merged 2 commits into from
Jul 2, 2021

Conversation

fideloper
Copy link
Contributor

@fideloper fideloper commented Jul 1, 2021

The parameters and tests were updated to use the correct array keys needed for the newer SES client.

This PR does 2 things:

  1. Uses the correct parameters to send a raw email 😅
  2. Removes the FromEmailAddress parameter (explanation below)

@fideloper
Copy link
Contributor Author

fideloper commented Jul 1, 2021

Dropping the FromEmailAddress parameter:

Using the FromEmailAddress parameter appears to over-writes the From address set in the Raw email headers.

This has the unwanted affect of removing the name portion of the From email (e.g. name <foo@example.com> becomes foo@example.com).

So I believe we can drop that parameter.

It's seemingly not the same as the old API's Source which is required as a fallback if no From is set in the raw email.

Docs for comparison of relevant explanation:

SesClient::sendRawEmail()

Source: The identity's email address. If you do not provide a value for this parameter, you must specify a "From" address in the raw text of the message. (You can also specify both.)

SesV2Client::sendEmail()

FromEmailAddress: The email address that you want to use as the "From" address for the email. The address that you specify has to be verified.

@fideloper fideloper marked this pull request as ready for review July 1, 2021 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants