5
ultrono
8y

/rambling

Arghhh!

Okay, so have just been having a play with Mailgun's webhook functionality (a client finally has a decent use for these).

I setup a test endpoint that sends a mail via Mailgun and then handles the POST data too. It emails myself the raw POST request response from Mailgun when I open the email. Mailgun fire an event their end when they detect the message has been opened.

All is good apart from Mailgun are posting multiple requests for each event, which is annoying.

After an hour messing around and getting annoyed I have a complete face palm moment.

In my test script Mailgun is called is send my notification email! So I'm creating multiple events for the same test message.

i.e. send original message, receive post back from Mailgun to my endpoint, my script then emails me the result using Mailgun. The latter itself generates its own events again.

Sooooo stupid of me to not notice something so obvious :(

Comments
Add Comment