How do I receive notification of the delivery of an email via communication services

Marcus 60 Reputation points
2025-03-15T03:32:02.2633333+00:00

Hi,

I'm using the Java SDK for Azure communications and sending emails however I am unable to tell if the emails are actually being sent or deleivered. IS there a way I can get a notification via Axure or even check via the SDK that the email has been delievered.

Marcus

Azure Communication Services
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
1,245 questions
0 comments No comments
{count} votes

Accepted answer
  1. Siva Nair 2,420 Reputation points Microsoft External Staff Moderator
    2025-03-17T02:40:15.5333333+00:00

    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.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.