email - Should Thunderbird send inline png attachments as text/plain?

26
2014-04
  • Sparhawk

    I'm composing emails in Thunderbird. When I attach png images by dragging to the header region, they are attached as

    Content-Type: image/png;
     name="foo.png"
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment;
     filename="foo.png"
    

    When I attach them inline by dragging into the body, they are attached as

    Content-Type: text/plain; charset=ISO-8859-1
    Content-Transfer-Encoding: base64
    Content-ID: <[email protected]>
    

    The latter displays fine for the recipient if they are using Thunderbird, or via the gmail web interface. However, I've had complaints from OSX Mail.app users that they can only see a text file <Mail Attachment.txt> full of nonsense. They have to save the file and rename it to *.png.

    Also kmail is confused by this attachment, although it seems to get some information from the attachment: enter image description here

    Should the attachments not be sent as text/plain? (However, it's interesting that Gmail understands it.) If so, then how can I make Thunderbird send inline attachments as the proper mime type?

  • Answers
  • Sparhawk

    Thunderbird downloaded from the website works fine, so it looks like it's a bug introduced in the Ubuntu packages. I've filed a bug here.


  • Related Question

    email - Mac Mail: Inline Attachments?
  • Pete

    Let's say a user sends me e-mail with an attached file: attachment.txt, which contains the text

    This is the contents of attachment.txt!!!1one

    In Thunderbird, I would see a little icon labeled "attachment.txt". However, in Mac Mail (v 3.6 935/935.3), the text file is in-lined, so the message looks like this:

    On Jul 24, 2009, at 8:38 AM, John Doe wrote:

    Hi Pete, I've attached the file.

    This is the contents of attachment.txt!!!1one

    This automatic inline attachment gets really annoying when a colleague sends me a 400 line C++ code & refers to line number n... I have to manually copy & paste the contents of the e-mail into a seperate file, then hope I got the spacing correct in order to jump down to line n. How do I use Mac mail to list/download individual attachments as an icon/separate file?


  • Related Answers
  • g .

    I always see the files as attachments. I just did a quick test with a simple text file and it is displayed as an attachment as expected. Perhaps it has to do with the way the file is attached by the sending mail client?

    If you take a look at the raw source (Command-Option-U), you can see some details on how the attachment is included in the message. If the Content-Disposition says inline, it is correct for Mail to display the attachment in the message as you describe. If the Content-Disposition says attachment, it should appear as a separate file.

    Here is what my test looked like.

        --Apple-Mail-5--439805500
        Content-Type: text/plain;
            charset=US-ASCII;
            format=flowed
        Content-Transfer-Encoding: 7bit
    
        Hi Pete, I've attached the file.
    
    
        --Apple-Mail-5--439805500
        Content-Disposition: attachment;
            filename=attachment.txt
        Content-Type: text/plain;
            x-unix-mode=0644;
            name="attachment.txt"
        Content-Transfer-Encoding: 7bit
    
        This is the contents of attachment.txt!!!1one
        --Apple-Mail-5--439805500
        Content-Type: text/plain;
            charset=US-ASCII;
            format=flowed
        Content-Transfer-Encoding: 7bit
    
    
    
        --Apple-Mail-5--439805500--
    
  • Arjan

    Apple calls this "View in Place". You can control-click the text and choose to display it as an icon (if it is indeed actually an attachment), but as far as I know Mail will not remember this setting. It can indeed be confusing at times. Like for PDF, the way an attachment is displayed depends on the number of pages.

    To switch it off:

    defaults write com.apple.mail DisableInlineAttachmentViewing -boolean NO
    

    Apart from that, I can always see the attachments in the top of the preview pane. These allow for saving, even when displayed inline. (Menu File, Save Attachments...)

  • 8088

    You could control click the inline element and tell it to display as an icon. For a more comprehensive solution see: Freeware application: Mail Attachments iconizer

    Which should:

    Mail Attachments Iconizer 2 gives you control over attachment handling in Apple Mail. It fixes the most annoying Apple Mail flaws and allows you to configure how attachments are displayed and sent using a simple interface.

    alt text