Pineapple News has the ability to decode binary attachments that are part of newsgroup messages. Supported formats are MIME Base64, MIME Inline, and UUEncode. It also knows how to decode binaries that are spread across two or more messages. The only other attachment format I'm aware of is BinHex which was once popular on the Macintosh but seems to be fading.
The program does not yet have the ability to post messages with binary attachments but that will be coming in a later version.
Message attachment support is an enhanced feature that you can only use if you pay for Pineapple News. For more information see the help topic Registering the Program.
To view an attachment, first select the message that you're interested in by clicking on it in the headers view. If the message contains one or more attachments then a square button will appear at the far right end of the message header bar. The button will display an icon that represents the attachment's file type, if it can be determined. Note that the attachment button will only appear if "Show All Headers" is turned off.
To view a message attachment simply click the attachment button with your mouse, select "View All" from the Attachment menu, or press the action's shortcut key, Alt-F. A small window will appear showing progress as the program converts text from the message into a binary file. Finally, the file will be launched in whatever viewer program is appropriate for that type of file, according to the associations set up in the FileTypes database (more on this later). If the message contains more than one attachment then you'll see more than one progress window, and each attachment will be launched in turn.
To save an attachment, right-click on the attachment button or select the "Actions..." item from the Attachment menu. You should see a pop-up menu appear over the attachment button. If the message contains only one attachment then the menu will contain two items, View and Save. Select Save and you'll get a file panel that will prompt you for a directory to save the file to.
If the message contains more than one attachment then the pop-up menu will contain an item for each one which leads to a sub-menu with View and Save items for this particular attachment.
Most news servers restrict the maximum size for newsgroup messages. Therefore some attachments might be so big that they won't fit into a single message. Attachments of this type are spread across two or more messages so that each part will be under the size limit.
To view a message of this type select the first message of the set. You should see an attachment button appear as usual. It won't work if you try to view the second or subsequent parts, those messages will never display an attachment button.
When you click the attachment button Pineapple News will examine all messages in the current newsgroup or saved message folder, attempting to find all parts that make up the attachment. It does this by examining the subject lines: multi-message attachments nearly always have subjects that are in the form "Filename.ext (1/3)", "Filename.ext (2/3)", and so on.
It's possible that Pineapple News will not be able to find all parts of the attachment. If that happens it will display an error message and abort the process. Look through the headers view and make sure that all messages are present and that they have all been completely downloaded. It might help to create a storage folder and drag and drop messages into it one by one and perform the attachment decode there.
If all else fails you will have to manually select all the messages that make up the attachment with the attachment combiner window. Unfortunately I haven't written that window yet, it will appear in a later version, coming soon.
The most complicated form of attachment scenario is where two or more attachments are spread across a group of two or more message files. In this case two or more of the messages may contain an attachment button, depending on which file contains the start of each attachment. Viewing this type of attachment works pretty well but could probably use some refinement. Later releases of the program will handle this situation better.
Fortunately this type of message scenario is very rare. Usually you'll see one message containing one or more attachments, one attachment spread across two or more messages, and very little else.
Pineapple News' handling of attachments is very closely tied to the FileTypes database. For instance, the icon that is displayed on the attachment button is discovered by querying the database for that information. Also, when it's time to view an attachment, it is the FileTypes database that decides which app is best suited to open the file. The practical upshot is that you can vastly improve attachment handling with the FileTypes preferences app.
Let's consider an example. Say you're looking at message that contains a MIDI file, and the message's attachment format is UUEncode. The MIME attachment format is far superior and contains lots of information about the attachment that you won't find in a UUEncode message. Therefore Pineapple News has no way to identify the file except by its file extension, which will probably be ".mid".
For some reason the FileTypes database does not contain ".mid" as an extension associated with the MIDI filetype. That's a bad oversight that you can correct. Start up the FileTypes preferences app, select the "Audio" group, then "Midi Data". In the "File Extensions" area, type in ".mid", without the quotes but with the period. From now on Pineapple News will always be able to identify MIDI files that have the ".mid" extension. Note that you could also add a custom icon here if you wish, and also change the application that will be used to view this file type.
You can create brand new MIME types to suit your own whims. Here's an example. Some newsreaders can be configured to add a tiny attachment to every outgoing post called a "VCard", which is shorthand for "virtual business card." It's a simple text file that contains human-readable information in a certain format. Here's how you can add support for these files to Pineapple News.
Start the FileTypes app. Select the "text" item in the list on the left. Press the "Add" button, which will open a new window. Make sure the group pop-up says "text." For "Type name:" put VCard, for "Internal name" put "x-vcard" (without the quotes). Hit the Add button. You should see your new MIME type appear in the list. Add the string ".vcf" in the File Extensions box. For Preferred Application, used StyledEdit or any other text editor. You'll have to browse to your apps folder to select the application, and the FileTypes app will complain that this app doesn't appear to know how to handle this file type, but you can ignore it.
Finally, to get really fancy, let's add an icon for this type. VCards are similar to BeOS People files, so the Person icon will be appropriate. Use the Tracker to browse to /boot/apps and select the People app. Right-click on it. Select "Open With..." then FileTypes. This should open a window that shows information about this app, including its main program icon and also the icon it contains for Person files. Drag the Person icon into the icon well on the FileTypes app where you just created your new VCard type. Close everything and you're done.
From now on, when you see a message that contains a VCard, Pineapple News will display the Person icon on the attachment button. Clicking on the button will display the VCard information in StyledEdit.
There are many uses for this technique. As another example, messages sometimes contain Windows virus executables disguised as pictures to lull the unwary into clicking on them, thereby infecting their computers. BeOS is immune from Windows viruses but it's still interesting to know about messages of this type. You could create a new MIME type called, say, "DOS/Windows Executable", associate the extension ".exe" with it, an add some kind of attention-grabbing icon so they'll stand out.