
Message-ID Issue with Mailgun Batch Sending API? - clintavo
Hi HN,<p>Hoping someone else has seen and resolved this issue. We&#x27;ve been testing moving some email sending load over to Mailgun from our current provider.  One of our main goals is to improve performance and speed by utilizing Mailgun&#x27;s batch sending api with recipient variables.<p>We&#x27;ve run into an interesting issue and aren&#x27;t sure how to resolve it (or if we can resolve it).<p>When we submit the batch, Mailgun does indeed send all the messages in the batch, whether it&#x27;s one or 1,000.  However, Mailgun assigns them all the exact same &quot;Message-Id&quot; header.<p>This causes strange and undesirable behavior in the email clients.  Specifically, if an email client receives two or more messages from the batch, it simply drops all but one of them.  It&#x27;s as if they don&#x27;t exist.  That&#x27;s because the Message-Id header is supposed to be, according to the RFC, unique for each and every message.  That&#x27;s why it appears to exist.  Mailgun APPEARS to be violating the RFC by setting the Message-ID header as the same for each message in the batch.  We were able to &quot;resolve&quot; the issue by passing the messages to Mailgun&#x27;s api one at a time, but that is not a real solution.  That worked for testing a dozen messages, but what about when we&#x27;re sending 300,0000 or 1,000,000?  That&#x27;s part of the reason we wanted to use the batch api.  Our opt-in newsletter is around 70,000.  We&#x27;d rather make 70 api calls instead of 70,000 for obvious reasons.<p>here is the actual RFC:   https:&#x2F;&#x2F;tools.ietf.org&#x2F;html&#x2F;rfc2392<p>It states, &quot;the message-id of an email message to refer to a SPECIFIC message.&quot;  and &quot;Both message-id and content-id are required to be globally unique.    That is, no two different messages will ever have the same Message-ID &quot;<p>Has anyone else seen this?  And (please), if you have, has anyone else come up with a way to resolve it?
======
kehers
Send a support mail to Mailgun and hear what they have to say about it. You
can also consider using their mailing list option:
[https://documentation.mailgun.com/en/latest/api-
mailinglists...](https://documentation.mailgun.com/en/latest/api-
mailinglists.html#mailing-lists)

