Hi Marcus,
Azure Communication Services (ACS) does not provide direct delivery status checks through the Java SDK. Instead, ACS integrates with Azure Event Grid, which allows you to subscribe to email lifecycle events like EmailDelivered, EmailOpened, and EmailBounced. To receive such notifications, you need to enable Event Grid for your Communication Services resource. https://learn.microsoft.com/en-us/azure/event-grid/communication-services-email-events
Once Event Grid is enabled, you need to create an Event Subscription on your Communication Services resource. This subscription can forward events to various endpoints like Azure Functions, Webhooks, or Logic Apps. This allows you to automate processing of delivery confirmations and failures. https://learn.microsoft.com/en-us/azure/event-grid/event-handlers
After setting up the event subscription, you need to implement an endpoint or event handler to receive and process these email events. The handler can be any HTTP endpoint (e.g., a REST API, Azure Function, or Logic App) that listens for incoming event notifications from Event Grid. It should also handle Event Grid subscription validation when first created. https://learn.microsoft.com/en-us/azure/event-grid/end-point-validation-cloud-events-schema#event-grid-event-schema
When sending an email via the ACS Java SDK, make sure to capture and store the message ID returned by the SDK. This message ID is used to correlate the email you sent with the delivery event that you will later receive. The message ID returned from SendEmailResult.getMessageId()
should be recorded for tracking purposes.
Once emails are sent and events are being captured by your event handler, you can monitor these events and correlate them with your stored message IDs to determine if an email was successfully delivered, opened, or bounced. This creates an end-to-end email status tracking system without polling. https://learn.microsoft.com/en-us/java/api/overview/azure/communication-email-readme?view=azure-java-stable
If you have any further assistant, do let me know.
If the answer is helpful, please click Accept Answer and kindly upvote it so that other people who faces similar issue may get benefitted from it.