The answer to this question specifically mentions using the params [:body-plain]. However, Rails throws this error: NameError (undefined local variable or method 'plain' for #<IncomingMailsController:0x0000000913f278>):
How can I access params that have a hyphen in? I can’t change the params as they’re posted from a third party API (Mailgun).
You need to access them like this:
Or even just like this:
You have to escape your
symbolname if it contains special characters.