thoughtbot / griddler

Simplify receiving email in Rails (deprecated)
http://griddler.io/
MIT License
1.38k stars 199 forks source link

Handle email with no body #59

Closed jhosteny closed 11 years ago

jhosteny commented 11 years ago

I know this was partially addressed by #28 and #29. If an email is sent with an attachment only though, I see an EmailBodyNotFound exception. Our use case is using email to upload files to a registered account, where the existence of the body is optional (as a note for the uploaded file).

I have a patch that just removes this entirely, if there's interest in pulling it. Since it deletes this exception entirely, there is no test for it. The test case that expects the exception is also deleted so that the existing suite passes.

theycallmeswift commented 11 years ago

What provider are you using that you get no body? I'm not sure if this is even possible on most of them.

jhosteny commented 11 years ago

I'm actually just using SendGrid. The email was composed with Mail on OS X. Is it possible other clients insert at least a new line before an attachment?

On Jun 14, 2013, at 9:13 PM, Swift notifications@github.com wrote:

What provider are you using that you get no body? I'm not sure if this is even possible on most of them.

— Reply to this email directly or view it on GitHub.

theycallmeswift commented 11 years ago

Interesting. Can you send me the sample json you are receiving so I can write a test and fix it? — Sent from what may as well be a flip phone.

On Fri, Jun 14, 2013 at 9:35 PM, Joe Hosteny notifications@github.com wrote:

I'm actually just using SendGrid. The email was composed with Mail on OS X. Is it possible other clients insert at least a new line before an attachment? On Jun 14, 2013, at 9:13 PM, Swift notifications@github.com wrote:

What provider are you using that you get no body? I'm not sure if this is even possible on most of them.

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub: https://github.com/thoughtbot/griddler/issues/59#issuecomment-19489366

jhosteny commented 11 years ago

Sure, happy to - probably won't get to it until next week though.

On Jun 14, 2013, at 9:44 PM, Swift notifications@github.com wrote:

Interesting. Can you send me the sample json you are receiving so I can write a test and fix it? — Sent from what may as well be a flip phone.

On Fri, Jun 14, 2013 at 9:35 PM, Joe Hosteny notifications@github.com wrote:

I'm actually just using SendGrid. The email was composed with Mail on OS X. Is it possible other clients insert at least a new line before an attachment? On Jun 14, 2013, at 9:13 PM, Swift notifications@github.com wrote:

What provider are you using that you get no body? I'm not sure if this is even possible on most of them.

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub: https://github.com/thoughtbot/griddler/issues/59#issuecomment-19489366 — Reply to this email directly or view it on GitHub.

theycallmeswift commented 11 years ago

Ok, thanks. Will keep my eyes out for your update.  — Sent from what may as well be a flip phone.

On Fri, Jun 14, 2013 at 9:49 PM, Joe Hosteny notifications@github.com wrote:

Sure, happy to - probably won't get to it until next week though. On Jun 14, 2013, at 9:44 PM, Swift notifications@github.com wrote:

Interesting. Can you send me the sample json you are receiving so I can write a test and fix it? — Sent from what may as well be a flip phone.

On Fri, Jun 14, 2013 at 9:35 PM, Joe Hosteny notifications@github.com wrote:

I'm actually just using SendGrid. The email was composed with Mail on OS X. Is it possible other clients insert at least a new line before an attachment? On Jun 14, 2013, at 9:13 PM, Swift notifications@github.com wrote:

What provider are you using that you get no body? I'm not sure if this is even possible on most of them.

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub: https://github.com/thoughtbot/griddler/issues/59#issuecomment-19489366

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub: https://github.com/thoughtbot/griddler/issues/59#issuecomment-19489563

calebhearth commented 11 years ago

Are we holding off on resolving #60 pending your check, @theycallmeswift? Are you going to try for a SendGrid-side solution?

theycallmeswift commented 11 years ago

I don't actually like that solution. I would rather convert an empty body to an empty string. Thoughts? — Sent from what may as well be a flip phone.

On Sat, Jun 15, 2013 at 7:55 PM, Caleb Thompson notifications@github.com wrote:

Are we holding off on resolving #60 pending your check, @theycallmeswift? Are you going to try for a SendGrid-side solution?

Reply to this email directly or view it on GitHub: https://github.com/thoughtbot/griddler/issues/59#issuecomment-19505532

calebhearth commented 11 years ago

Agreed. I did a quick search through the Email rfc but I can't find anything on wether the body of an email is optional.

Caleb Thompson Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On Saturday, June 15, 2013 at 7:57 PM, Swift wrote:

I don't actually like that solution. I would rather convert an empty body to an empty string. Thoughts?

Sent from what may as well be a flip phone.

On Sat, Jun 15, 2013 at 7:55 PM, Caleb Thompson <notifications@github.com (mailto:notifications@github.com)>
wrote:

Are we holding off on resolving #60 pending your check, @theycallmeswift? Are you going to try for a SendGrid-side solution?

Reply to this email directly or view it on GitHub:
https://github.com/thoughtbot/griddler/issues/59#issuecomment-19505532

— Reply to this email directly or view it on GitHub (https://github.com/thoughtbot/griddler/issues/59#issuecomment-19505553).

theycallmeswift commented 11 years ago

I remember submitting a bug about this once. It is aloud. Will dig up the supporting docs once I start working on this.  — Sent from what may as well be a flip phone.

On Sat, Jun 15, 2013 at 7:58 PM, Caleb Thompson notifications@github.com wrote:

Agreed. I did a quick search through the Email rfc but I can't find anything on wether the body of an email is optional.

Caleb Thompson Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Saturday, June 15, 2013 at 7:57 PM, Swift wrote:

I don't actually like that solution. I would rather convert an empty body to an empty string. Thoughts?

Sent from what may as well be a flip phone.

On Sat, Jun 15, 2013 at 7:55 PM, Caleb Thompson <notifications@github.com (mailto:notifications@github.com)>
wrote:

Are we holding off on resolving #60 pending your check, @theycallmeswift? Are you going to try for a SendGrid-side solution?

Reply to this email directly or view it on GitHub:
https://github.com/thoughtbot/griddler/issues/59#issuecomment-19505532

— Reply to this email directly or view it on GitHub (https://github.com/thoughtbot/griddler/issues/59#issuecomment-19505553).


Reply to this email directly or view it on GitHub: https://github.com/thoughtbot/griddler/issues/59#issuecomment-19505563

calebhearth commented 11 years ago

Looks like this was fixed.