Comments (5)
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.
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.
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.
I wish I had saved some of my notes for you. It's a hard one to track down!
from incoming.
This thread was a big help: mikel/mail#431
from incoming.
Related Issues (8)
- Automatically parse raw mime messages from Mailgun based on request.path HOT 3
- Postfix in README HOT 1
- Rack:Request is not the same as ActionDispatch::Request HOT 1
- protected method `authenticate' called for EmailReceiver on Sengrid
- Postmark fixture is out-of-date. Postmark doesn't parse properly. HOT 2
- Sendgrid strategy decoding issue with Content-Transfer-Encoding: base64
- What is the purpose of the `api_key` option for MailGun? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from incoming.