aws / aws-sdk

Landing page for the AWS SDKs on GitHub
https://aws.amazon.com/tools/
Other
68 stars 12 forks source link

Suggest a more intuitive interface when setting email sender name #668

Closed e-build closed 5 months ago

e-build commented 6 months ago

Describe the feature

I am sending mail using aws-java-sdk-sesv2. We propose a more intuitive interface when specifying mail sender names. As I suggested adding features, I would like to contribute by working on it myself. Please give me feedback.

Use Case

This was my first time developing an email sending function in the field. I confirmed that if there is no special setting for the email sender's name, the email is sent by default setting. As a requirement, the sender name had to be set separately from the email address. Without a good understanding of the SMTP protocol, I looked into configuring the sender name separately from the email address, and found that I currently need to set it up this way:

String from = "FooName <foo@foomail.com>"
return new SendEmailRequest()
    .withDestination(destination)
    .withFromEmailAddress(from)
        ...

I'm sure many people have the same problem as me when deciding on an email sender name in situations where they are unfamiliar with the SMTP protocol.

Proposed Solution

I suggest adding an interface like this to make setting names more intuitive:

return new SendEmailRequest()
    .withDestination(destination)
    .withFromEmailAddress("foo@foomail.com")
    .withSenderName("FooName") <- added part
        ...

Other Information

No response

Acknowledgements

AWS Java SDK version used

2.21.40

JDK version used

17

Operating System and version

macos

debora-ito commented 6 months ago

Hi @e-build, thank you for the detailed feedback.

What you are asking for is a service-side change. The SDKs are auto generated based on service models, so SES would have to add the new attribute to their model upstream.

I'll raise your request to the SES team, and I'll move your feature request to the cross-SDK repo aws/aws-sdk for visibility.

P110317152

e-build commented 6 months ago

@debora-ito Thank you for answer. Would it be okay if I modified it myself and submitted a Pull Request?

debora-ito commented 6 months ago

@e-build The model change must be made by the service team internally, upstream in the SDK release process.

We won't accept PRs for model changes because the APIs must be consistent across all language SDKs, the SES SendEmail must have the same interface in the SDKs for Java, Python, Kotlin, Go, etc.

We reached out to the SES team, and they added your request to their feature backlog. They don't have a timeline to share for when the change will be picked up. I'll mark this to auto close soon, as there's no action pending on the SDK side, but let us know if you have any questions.

github-actions[bot] commented 5 months ago

This issue is now closed.

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.