Przeszukaj pomoc

Unikaj oszustw związanych z pomocą.Nigdy nie będziemy prosić Cię o dzwonienie na numer telefonu, wysyłanie SMS-ów ani o udostępnianie danych osobowych. Zgłoś podejrzaną aktywność, korzystając z opcji „Zgłoś nadużycie”.

Więcej informacji

.txt file arrives inline and corrupt - Thunderbird 115

  • 7 odpowiedzi
  • 0 osób ma ten problem
  • 2 wyświetlenia
  • Ostatnia odpowiedź od 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?
Załączone zrzuty ekranu

Wszystkie odpowiedzi (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.

Zmodyfikowany przez Matt w dniu

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.