Platforms to show: All Mac Windows Linux Cross-Platform

MimeAttachmentMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class EmailParser MBS CURL Plugin 15.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The class for an attachment.
Example
// save all attachments of an email file to a folder
Var mail As New MimeEmailMBS(SpecialFolder.Desktop.Child("mail.eml"))
Var folder As FolderItem = SpecialFolder.Desktop.Child("Attachments")
If Not folder.Exists Then folder.CreateFolder

For Each a As MimeAttachmentMBS In mail.Attachments
If a.Filename = "" Then Continue
Var stream As BinaryStream = BinaryStream.Create(folder.Child(a.Filename), True)
stream.Write a.Data
stream.Close
System.DebugLog "Saved " + a.Filename + " (" + a.MimeType + ", " + a.Data.Bytes.ToString + " bytes)"
Next

This is an abstract class. You can't create an instance, but you can get one from various plugin functions.

This class has no subclasses.

Blog Entries

Xojo Developer Magazine

Release notes

Some methods using this class:

Some examples using this class:

Some related classes:


The items on this page are in the following plugins: MBS CURL Plugin.


MimeAddressMBS   -   MimeBodyMBS


The biggest plugin in space...