I am using a MailGun action to forward an inbound email to a REST service on our server. When MailGun posts the email to our server, the subject of the email is duplicated.
I using ASP .NET's HttpRequest object to read the value of the subject from the POST like so:
string subject = request["Subject"]; //If email subject was "Test" the contents of subject would be "Test,Test"
Why is this happening?
The reason is that MailGun is passing the subject in twice, once as "subject" and again as "Subject". This was done for backward compatibility. Apparently .NET is merging them into the one field.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With