-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Mailer] [Azure] Fix resource name validation #53388
8000 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
[Mailer] [Azure] Fix resource name validation #53388
Conversation
Hey! I see that this is your first PR. That is great! Welcome! Symfony has a contribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
src/Symfony/Component/Mailer/Bridge/Azure/Tests/Transport/AzureApiTransportTest.php
Outdated
Show resolved
Hide resolved
Thank you for your contribution, can you maybe show your anonymized resource name or link to the corresponding Azure documentation? Thanks cc @hafael as you contributed the bridge |
Hi @OskarStark , I have seen this for the new Azure Communication Resources naming where they are appending the Data Location in resource endpoint url. For Example I have created two Azure Communication Resources (One in US and other In India) and seen the pattern repeated. Check the endpoint in the screenshots: The same format for endpoint can be found in the last image attached in their documentation. IMHO, The way we are formatting the host/endpoint,
We should allow the resource with dots in name so the we can get the correct host/endpoint in these scenarios . |
Thanks for the explanation. From what I can see in your screenshots, we must change the following too, or does the bride works for you, when removing the "contain dot" part? - private const HOST = '%s.communication.azure.com';
+ private const HOST = '%s.communications.azure.com'; |
I have just tested again and It is working fine for me. I am receiving email without any issue so I think we don't need to change the current host url structure. As the same url is reflecting in my dashboard too that I have attached the first two screenshot of, I assume the documentation from I attached the third image is old. I think we can go with current url structure i.e. . And the same is being used in their Java SDK too.
Just to be on safe side I have tried the other url ( ![]() |
👍 This works as expected. communication.azure.com is correct. |
4cf0b45
to
088faf5
Compare
Thanks for fixing this bug @t9toqwerty. |
Remove validation where Azure Email Communication Resource with dot in name is not being allowed to use.