为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

.txt file arrives inline and corrupt - Thunderbird 115

  • 7 个回答
  • 0 人有此问题
  • 2 次查看
  • 最后回复者为 Matt

more options

I have attachments set to be downloadable. I regularly receive a .txt file which I need to import into an analysis programme, but it always shows inline. I've checked all the settings and inline is definitely not selected. The content it shows is incomplete and corrupt so even if I copy it and paste it into another file it is not useable.

Windows Mail and another email client both show it as a downloadable attachment so there is nothing wrong with the file or how it is sent. When it is downloaded from these programs it opens as a regular txt document in notepad.

I have noticed that the .txt file has unix(LF) rather than the usual Windows (CRLF) in the footer. Could that

have something to do with it?

I hate having to run Windows mail in tandem just to receive these files. Any suggestions please?

I have attachments set to be downloadable. I regularly receive a .txt file which I need to import into an analysis programme, but it always shows inline. I've checked all the settings and inline is definitely not selected. The content it shows is incomplete and corrupt so even if I copy it and paste it into another file it is not useable. Windows Mail and another email client both show it as a downloadable attachment so there is nothing wrong with the file or how it is sent. When it is downloaded from these programs it opens as a regular txt document in notepad. I have noticed that the .txt file has unix(LF) rather than the usual Windows (CRLF) in the footer. Could that have something to do with it? I hate having to run Windows mail in tandem just to receive these files. Any suggestions please?
已附加屏幕截图

所有回复 (7)

more options

McWoozle said

Windows Mail and another email client both show it as a downloadable attachment so there is nothing wrong with the file or how it is sent. When it is downloaded from these programs it opens as a regular txt document in notepad.

I would disagree, if it works fine in windows mail it is highly likely that the file is incorrectly identified in the body of the email. Micrisift in their windows world make file extensions the king of working out what a file is. The internet, email and Unix/Linux/Apple use media types. SO your analysis indicates to me an encoding issue, exactly the reverse of what you assume.

Open the source of the email (ctrl+U) and scroll down until you locate the descriptor for the attachment. This is an example of the type of information you are seeking.

Content-Disposition: attachment; filename="INV-AUS-1192341-54464-25.pdf"
Content-Transfer-Encoding: base64
Content-Type: application/pdf; name="INV-AUS-1192341-54464-25.pdf"

How is your attachment described? I would expect one of the text types https://www.iana.org/assignments/media-types/media-types.xhtml#text but what I have been seeing delivered mostly by ".net developers" is a mishmash of failures to understand media types at all and a predominance of encoding all files as a binary octet stream and hoping it works. (It does if you are a Microsoft Office only shop)

I have noticed that the .txt file has unix(LF) rather than the usual Windows (CRLF) in the footer. Could that have something to do with it?

Probably not. But it would certainly cause import issues in Microsoft Excel, or at least the older versions I have used, which want to "import" Unicode and all Unix text files.

由Matt于修改

more options

I have attached what the source code showed. Also a shot of how the email displays in Thunderbird and a shot of what an actual .txt file should look like when opened.

If I login online to the account where the email with the attachment arrives the file is downloadable from there as a .txt file as you wold expect. Thanks

more options

So you are confirming the email is not correctly formed. There is no content type of text. I provided the link to the content types that exist, and I can not find "text" as a content type. That should not in itself be enough to suppress the display of the attachment though as an attachment.

What is totally irrelevant here is that other programs deviate from the standard with the result the content is correctly displayed. (I said before Microsoft and their followers think that a file extension is all they need. That is not correct.)

However, do you have the the display attachments inline on the view menu selected? Use the config editor to check mail.inline_attachments.text is set to false (the default since V68).

more options

Yes I definitely have mail.inline_attachments.text set to false.

more options

Can you send me the email as an attachment so I can have a fiddle and see if I can replicate what you have with the exact same thing (which is why I want it as an attachment). Matt_AU at gmx dot com

more options

Apparently no solution. Have moved to different email client, so found a solution.

more options

McWoozle said

Apparently no solution. Have moved to different email client, so found a solution.

I am still working on it, when I have time. Funny thing about doing volunteers work. You do it when you can, not when someone wants you to. But your involvement is not really necessary for me to keep trying to work out what is happening. Enjoy your choice.