Gnus development mailing list
 help / color / mirror / Atom feed
* attachment options?
@ 2010-09-17  8:30 Eric Abrahamsen
  2010-09-17  9:29 ` Steinar Bang
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Eric Abrahamsen @ 2010-09-17  8:30 UTC (permalink / raw)
  To: ding

I have a Kindle 3, and you can email yourself documents at a kindle
email address to have them converted into a readable format and then
delivered to the Kindle wirelessly. I've found that attaching Word docs
to messages and sending them from gnus doesn't work: Amazon bounces me a
message saying there was no attachment on the email. The same message
with the same file sent from gmail's web interface works.

I am attaching the file to the gnus message with all the defaults:
Content type is application/msword and disposition is attachment. As far
as I know those are the correct settings for a plain vanilla file
attachment. Amazon's error message doesn't say anything beyond "no
file", does anyone know of any alternate attachment methods I could use,
or other settings to tweak, to make these attachments more attachment-y?

Any advice appreciated,

Eric




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: attachment options?
  2010-09-17  8:30 attachment options? Eric Abrahamsen
@ 2010-09-17  9:29 ` Steinar Bang
  2010-09-19  3:41   ` Eric Abrahamsen
  2010-09-17 10:44 ` Frank Schmitt
  2010-09-17 18:08 ` Andreas Schwab
  2 siblings, 1 reply; 10+ messages in thread
From: Steinar Bang @ 2010-09-17  9:29 UTC (permalink / raw)
  To: ding

Maybe something between you and amazon strips the attachment?  Perhaps a
virus filter?

Have your tried changing the content type to "application/octet-stream"?

Maybe you need to zip the attachment?  Will Amazon be able to understand
that?




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: attachment options?
  2010-09-17  8:30 attachment options? Eric Abrahamsen
  2010-09-17  9:29 ` Steinar Bang
@ 2010-09-17 10:44 ` Frank Schmitt
  2010-09-17 18:08 ` Andreas Schwab
  2 siblings, 0 replies; 10+ messages in thread
From: Frank Schmitt @ 2010-09-17 10:44 UTC (permalink / raw)
  To: ding

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> I have a Kindle 3, and you can email yourself documents at a kindle
> email address to have them converted into a readable format and then
> delivered to the Kindle wirelessly. I've found that attaching Word docs
> to messages and sending them from gnus doesn't work: Amazon bounces me a
> message saying there was no attachment on the email. The same message
> with the same file sent from gmail's web interface works.
>
> I am attaching the file to the gnus message with all the defaults:
> Content type is application/msword and disposition is attachment. As far
> as I know those are the correct settings for a plain vanilla file
> attachment. Amazon's error message doesn't say anything beyond "no
> file", does anyone know of any alternate attachment methods I could use,
> or other settings to tweak, to make these attachments more attachment-y?

Is point at the very end of the message when you attach the file? Even
after the signature? Otherwise the last part of the mail isn't the word
document but a text/plain part...

-- 
Have you ever considered how much text can fit in eighty columns?  Given that a
signature typically contains up to four lines of text, this space allows you to
attach a tremendous amount of valuable information to your messages.  Seize the
opportunity and don't waste your signature on bullshit that nobody cares about.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: attachment options?
  2010-09-17  8:30 attachment options? Eric Abrahamsen
  2010-09-17  9:29 ` Steinar Bang
  2010-09-17 10:44 ` Frank Schmitt
@ 2010-09-17 18:08 ` Andreas Schwab
  2 siblings, 0 replies; 10+ messages in thread
From: Andreas Schwab @ 2010-09-17 18:08 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: ding

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> I am attaching the file to the gnus message with all the defaults:
> Content type is application/msword and disposition is attachment. As far
> as I know those are the correct settings for a plain vanilla file
> attachment. Amazon's error message doesn't say anything beyond "no
> file", does anyone know of any alternate attachment methods I could use,
> or other settings to tweak, to make these attachments more attachment-y?

Do you put anything besides the attachment into the mail?  If not then
gnus generates a single-part message which contains the attachment
contents as the whole body.  Probably Amazon's parser is too lame to
handle that.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: attachment options?
  2010-09-17  9:29 ` Steinar Bang
@ 2010-09-19  3:41   ` Eric Abrahamsen
  2010-09-19  4:13     ` Dave Goldberg
  0 siblings, 1 reply; 10+ messages in thread
From: Eric Abrahamsen @ 2010-09-19  3:41 UTC (permalink / raw)
  To: ding

On Fri, Sep 17 2010, Steinar Bang wrote:

> Maybe something between you and amazon strips the attachment?  Perhaps a
> virus filter?
>
> Have your tried changing the content type to "application/octet-stream"?
>
> Maybe you need to zip the attachment?  Will Amazon be able to understand
> that?

Thanks to all for the suggestions! I've tried
"application/octet-stream", putting the attachment very last, and
zipping it, and so far only zipping the attachment has worked -- in all
other cases it has failed silently, or with a very unhelpful error
message. So that's a solution found, anyway! Still be nice to know
what's really going on, though...

Thanks again,
Eric




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: attachment options?
  2010-09-19  3:41   ` Eric Abrahamsen
@ 2010-09-19  4:13     ` Dave Goldberg
  2010-09-19  6:50       ` Eric Abrahamsen
  0 siblings, 1 reply; 10+ messages in thread
From: Dave Goldberg @ 2010-09-19  4:13 UTC (permalink / raw)
  To: ding

> So that's a solution found, anyway! Still be nice to know
> what's really going on, though...

You say it works from gmail?  Perhaps it would help to try sending it
to another address (perhaps as a CC) from gmail and seeing what the
structure looks like.

-- 
Dave Goldberg
david.goldberg6@verizon.net



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: attachment options?
  2010-09-19  4:13     ` Dave Goldberg
@ 2010-09-19  6:50       ` Eric Abrahamsen
  2010-09-19 11:50         ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 10+ messages in thread
From: Eric Abrahamsen @ 2010-09-19  6:50 UTC (permalink / raw)
  To: ding

On Sun, Sep 19 2010, Dave Goldberg wrote:

>> So that's a solution found, anyway! Still be nice to know
>> what's really going on, though...
>
> You say it works from gmail?  Perhaps it would help to try sending it
> to another address (perhaps as a CC) from gmail and seeing what the
> structure looks like.

Yeah, I guess I could have done that to begin with, right? So I emailed
myself a document twice, once from gmail's webmail, once from gnus, both
messages received in gnus. Due to my amazingly bad short-term memory I
used different DOC files, but they were both in Chinese, should have
been the same encoding for the file itself. Here are the two raw
messages as received in Gnus (left out some headers, hopefully this is
everything relevant). I just don't know enough about the email format to
see what's going on.

*****
MESSAGE FROM GMAIL WEBMAIL
*****

--8<---------------cut here---------------start------------->8---
Content-Type: multipart/mixed; boundary=001485f1e28ae1aecd049096dfdd
X-Content-Length: 90979
Lines: 1189
Xref: zerihar mail.misc:5637

--001485f1e28ae1aecd049096dfdd
Content-Type: text/plain; charset=UTF-8

Here's the document from gmail.

--001485f1e28ae1aecd049096dfdd
Content-Type: application/msword; name="=?UTF-8?B?54i25Lqy5LygLmRvYw==?="
Content-Disposition: attachment; filename="=?UTF-8?B?54i25Lqy5LygLmRvYw==?="
Content-Transfer-Encoding: base64
X-Attachment-Id: f_ge9ixieu0

0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAACAAAAfQAAAAAAAAAA
******
ELIDED ATTACHMENT
******
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
--001485f1e28ae1aecd049096dfdd--
--8<---------------cut here---------------end--------------->8---

******
GNUS MESSAGE
******

--8<---------------cut here---------------start------------->8---
Content-Type: multipart/mixed; boundary="=-=-="
X-Content-Length: 32129
Lines: 428
Xref: zerihar mail.misc:5639

--=-=-=
Content-Type: text/plain

This is a doc file sent from Gnus.

--=-=-=
Content-Type: application/msword
Content-Disposition: attachment;
 filename*0*=utf-8''%e8%ae%a9%e6%9b%b4%e5%a4%9a%e7%9a%84%e4%ba%ba%e7%9c%8b;
 filename*1*=%e5%88%b0%e7%81%ab%e8%bd%a6.doc
Content-Transfer-Encoding: base64

0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAABAAAAKQAAAAAAAAAA
******
ELIDED ATTACHMENT
******
AAAAAAAAAAAAAAA=
--=-=-=--
--8<---------------cut here---------------end--------------->8---







^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: attachment options?
  2010-09-19  6:50       ` Eric Abrahamsen
@ 2010-09-19 11:50         ` Lars Magne Ingebrigtsen
  2010-09-19 14:08           ` Eric Abrahamsen
  2010-09-21  2:14           ` Eric Abrahamsen
  0 siblings, 2 replies; 10+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-09-19 11:50 UTC (permalink / raw)
  To: ding

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Content-Disposition: attachment; filename="=?UTF-8?B?54i25Lqy5LygLmRvYw==?="

[...]

> Content-Disposition: attachment;
>  filename*0*=utf-8''%e8%ae%a9%e6%9b%b4%e5%a4%9a%e7%9a%84%e4%ba%ba%e7%9c%8b;
>  filename*1*=%e5%88%b0%e7%81%ab%e8%bd%a6.doc

This has to be the culprit.  Gnus uses RFC2231 encoding on file names:

(rfc2231-encode-string "filename" "héllo")
=> "filename*=iso-8859-1''h%e9llo"

While Gmail just RFC2047-encodes the file name.

I think Gnus should just do the same.  I don't think RFC2231 encoding
ever took off.  I'll check in a fix.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: attachment options?
  2010-09-19 11:50         ` Lars Magne Ingebrigtsen
@ 2010-09-19 14:08           ` Eric Abrahamsen
  2010-09-21  2:14           ` Eric Abrahamsen
  1 sibling, 0 replies; 10+ messages in thread
From: Eric Abrahamsen @ 2010-09-19 14:08 UTC (permalink / raw)
  To: ding

On Sun, Sep 19 2010, Lars Magne Ingebrigtsen wrote:

 > Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Content-Disposition: attachment; filename="=?UTF-8?B?54i25Lqy5LygLmRvYw==?="
>
> [...]
>
>> Content-Disposition: attachment;
>>  filename*0*=utf-8''%e8%ae%a9%e6%9b%b4%e5%a4%9a%e7%9a%84%e4%ba%ba%e7%9c%8b;
>>  filename*1*=%e5%88%b0%e7%81%ab%e8%bd%a6.doc
>
> This has to be the culprit.  Gnus uses RFC2231 encoding on file names:
>
> (rfc2231-encode-string "filename" "héllo")
> => "filename*=iso-8859-1''h%e9llo"
>
> While Gmail just RFC2047-encodes the file name.
>
> I think Gnus should just do the same.  I don't think RFC2231 encoding
> ever took off.  I'll check in a fix.

I didn't understand any of that besides "I'll check in a fix", but I
guess that's the important part! Thanks very much…

Eric




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: attachment options?
  2010-09-19 11:50         ` Lars Magne Ingebrigtsen
  2010-09-19 14:08           ` Eric Abrahamsen
@ 2010-09-21  2:14           ` Eric Abrahamsen
  1 sibling, 0 replies; 10+ messages in thread
From: Eric Abrahamsen @ 2010-09-21  2:14 UTC (permalink / raw)
  To: ding

On Sun, Sep 19 2010, Lars Magne Ingebrigtsen wrote:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Content-Disposition: attachment; filename="=?UTF-8?B?54i25Lqy5LygLmRvYw==?="
>
> [...]
>
>> Content-Disposition: attachment;
>>  filename*0*=utf-8''%e8%ae%a9%e6%9b%b4%e5%a4%9a%e7%9a%84%e4%ba%ba%e7%9c%8b;
>>  filename*1*=%e5%88%b0%e7%81%ab%e8%bd%a6.doc
>
> This has to be the culprit.  Gnus uses RFC2231 encoding on file names:
>
> (rfc2231-encode-string "filename" "héllo")
> => "filename*=iso-8859-1''h%e9llo"
>
> While Gmail just RFC2047-encodes the file name.
>
> I think Gnus should just do the same.  I don't think RFC2231 encoding
> ever took off.  I'll check in a fix.

Just noting that this did the trick, Amazon recognizes attachments
properly now…




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-09-21  2:14 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-17  8:30 attachment options? Eric Abrahamsen
2010-09-17  9:29 ` Steinar Bang
2010-09-19  3:41   ` Eric Abrahamsen
2010-09-19  4:13     ` Dave Goldberg
2010-09-19  6:50       ` Eric Abrahamsen
2010-09-19 11:50         ` Lars Magne Ingebrigtsen
2010-09-19 14:08           ` Eric Abrahamsen
2010-09-21  2:14           ` Eric Abrahamsen
2010-09-17 10:44 ` Frank Schmitt
2010-09-17 18:08 ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).