when configuring SparkPost my emails were getting rejected by policy. with this error message:
“X-MSYS-API ‘campaign_id’ is limited to 64 bytes”
Is it possible that Discourse is generating a long campaign_id for my emails, as it never happened before but this time i used a long domain name of about 34 characters?
Support for this header was added in this commit, and its use of the X-MSYS-API header is definitely broken according to the SparkPost docs. I’m thinking the code that sets that header just needs to be nuked from orbit. Any disagreements?
You could hand-edit the code in the container, which would persist until the next rebuild, but if you hang around for a little while, we’ll get it fixed properly, and you can just rebuild with the fixed code.
You could change “tests-passed” in app.yml to the id of a commit before the one that introduced the error. I made a post about that once, but can’t find it right now.
Oh,but if the database has migrated past you then that might not work.
Or it can be solved from within line #143 at file : discourse/lib/email/sender.rb @message.header[‘X-MSYS-API’] = { campaign_id: @message.message_id }.to_json