Azure / azure-sdk-for-java

This repository is for active development of the Azure SDK for Java. For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/java/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-java.
MIT License
2.32k stars 1.97k forks source link

[BUG] Not able to assign display name for sender email address in Communication Email #39910

Open Saurav-S-Purushothaman opened 5 months ago

Saurav-S-Purushothaman commented 5 months ago

Describe the bug I am trying to change the display name of the sender email address. The user part of the sender email address is DoNotReply. I want to change that. Is that possible? If it is not possible to set the display name using sdk, what is the alternative to achieve this?

I tried setting the .setSenderAddress of EmailMessage as below. Both cases gives me the same error. :

But <DoNotReply@example.com> is valid and its display name is DoNotReply. It sends email without any error

Exception or Stack Trace

Status code 400, "{"error":{"code":"BadRequest","message":"Request body validation error. See property 'senderAddress'","target":null,"details":null,"innererror":null}}

Expected behavior Feedback: It would be much better if the setSenderAddress is expecting an EmailAddress class instead of String so that we can set the display name. Ref - https://learn.microsoft.com/en-us/java/api/com.azure.communication.email.models.emailmessage?view=azure-java-stable#com-azure-communication-email-models-emailmessage-setsenderaddress(java-lang-string)

alzimmermsft commented 5 months ago

@acsdevx-msft as there isn't a CODEOWNER for email

joshfree commented 5 months ago

@vcolin7 same request, follow up with communication team offline to get a positive handoff, and update the CODEOWNER entry appropriately

Saurav-S-Purushothaman commented 4 months ago

@joshfree @vcolin7 Following up on these issues. Any progress? Can I expect anything in the near future? If not, could you guys guide me to any links or document for a work around to make this work? ( I wasn't able to find anything myself )

vcolin7 commented 3 months ago

Hi @yogeshmo, could you look into this when you get a chance? Thanks!

Florzl commented 1 month ago

Having the same issue any updates?