MIME Type

If I was to use IOSKIT to generate an email with an attachment which should be treated as a binary file,
what mime type would I supply here:?

mailComposeView = new Extensions.MFMailComposeViewController
mailComposeView.setToRecipients Array("email@example.com")
mailComposeView.setCcRecipients Array("email@example.com")
mailComposeView.setBccRecipients Array("email@example.com")
mailComposeView.setSubject "This is a sample email"
mailComposeView.addAttachment  myfolderitem, *????*, "thefilename.dat"

The MIME type of the FolderItem you’re attaching.

The MIME type of the FolderItem you’re attaching.

It doesnt have one…
It is (under the skin) an XML file with a custom extension
If I present it as text, the email will be pages of ‘junk’ to the recipient.
I need it to be a ‘lump’ that would usually only be downloaded.

Looks like application/octet-stream then…

application/octet-stream for “binary data” from the Mozilla reference I listed might do the trick.

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.