GithubHelp home page GithubHelp logo

Mandrill encoding errors about incoming HOT 5 OPEN

rymohr avatar rymohr commented on July 28, 2024
Mandrill encoding errors

from incoming.

Comments (5)

joshuap avatar joshuap commented on July 28, 2024

We use the raw_msg key to parse each inbound message from their WebHook using ruby's standard Mail library. As long as they are converting their whole JSON payload to UTF-8, I'm not sure why you would get encoding errors. The Mail lib does some of its own encoding/decoding as I recall, though. Do you have an error message/backtrace for the conversion errors you mentioned?

from incoming.

rymohr avatar rymohr commented on July 28, 2024

I do have a backtrace but it's not much help here since it doesn't blow up until I run the content through EmailReplyFilter. Just your typical incompatible character encodings: ASCII-8BIT and UTF-8 error.

Still waiting to hear back from Mandrill but I looked into one of the webhooks and it looks like only the event.msg.text field is converted to UTF-8. The content of raw_msg is in the original encoding (though encoded to be UTF-8 friendly I guess?).

We've been running into this error long enough that I finally just dropped incoming yesterday in favor of handling the webhooks directly and grabbing the body from event.msg.text. Seems to be working fine so far.

from incoming.

joshuap avatar joshuap commented on July 28, 2024

That sounds about right (event.msg.text). We probably should do something to handle bad encodings in the raw_msg field or switch to use the UTF-8 keys. I used raw_msg because it's a lot simpler to construct a Mail::Message from. It sounds like you have this resolved on your end for now, but I'll leave this open until I can work up a fix. :)

from incoming.

rymohr avatar rymohr commented on July 28, 2024

I wish I had saved some of my notes for you. It's a hard one to track down!

from incoming.

rymohr avatar rymohr commented on July 28, 2024

This thread was a big help: mikel/mail#431

from incoming.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.