[Python] EmailClient sending duplicate email on ACS

Discussão em 'Python' iniciado por Stack, Junho 13, 2025.

  1. Stack

    Stack Membro Participativo

    I'm using Azure Communication Services email sending with the azure.communication.email python package. The code that sends the email is in the Azure python function. The sending code is simple (no loops):

    client = EmailClient.from_connection_string(email_conn_string)

    message = {
    ...
    }

    poller = client.begin_send(message)
    result = poller.result()


    and according to the Azure Functions diagnostics, it gets called exactly once, and does not throw errors.

    The problem is that sometimes (up-to 30% of cases) the recipient gets the email twice as duplicate. According to the Communications Service logs, there are two SendEmail -operations within about 200ms: one to West Europe, and one to North Europe. The ACS configuration shows "Location: Global" and "Data Location: Europe".

    Any ideas on what causes this and how could I fix it?

    Continue reading...

Compartilhe esta Página