Platforms to show: All Mac Windows Linux Cross-Platform

Back to MimeEmailMBS class.

MimeEmailMBS.Attachments as MimeAttachmentMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method EmailParser MBS CURL Plugin 15.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The array of attachments.
Example
dim f as FolderItem = SpecialFolder.Desktop.Child("test.eml")
dim m as new MimeEmailMBS(f)

MsgBox str(m.Attachments.Ubound+1)+" attachments and "+str(m.Inlines.Ubound+1)+" inlines"

for each a as MimeAttachmentMBS in m.Inlines
MsgBox "Inline: " + a.Filename
next

See also:

MimeEmailMBS.Attachments(index as Integer) as MimeAttachmentMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method EmailParser MBS CURL Plugin 15.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries attachment by index.

Index is zero based.

See also:

MimeEmailMBS.Constructor(Content as MemoryBlock)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method EmailParser MBS CURL Plugin 15.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Parses an email from a memoryblock.

See also:

MimeEmailMBS.Constructor(Content as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method EmailParser MBS CURL Plugin 15.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Parses an email from a string.
Example
dim f as FolderItem = SpecialFolder.Desktop.Child("test.eml")
dim b as BinaryStream = BinaryStream.Open(f)
dim s as string = b.Read(b.Length)
dim m as new MimeEmailMBS(s)

MsgBox m.Subject

This is to parse raw email text, e.g. eml file.
To parse emlx, open the text file and read the first line. The first line contains the length of the email. Then read the following number of bytes of that value and that is the eml content. Followed by a plist structure.

See also:

MimeEmailMBS.Constructor(File as FolderItem)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method EmailParser MBS CURL Plugin 15.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Parses an email from a text file.
Example
dim f as FolderItem = SpecialFolder.Desktop.Child("test.eml")
dim m as new MimeEmailMBS(f)

MsgBox m.Subject

You can pass here an EML file.

See also:

MimeEmailMBS.Inlines as MimeAttachmentMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method EmailParser MBS CURL Plugin 15.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The array of inline items.
Example
dim f as FolderItem = SpecialFolder.Desktop.Child("test.eml")
dim m as new MimeEmailMBS(f)

MsgBox str(m.Attachments.Ubound+1)+" attachments and "+str(m.Inlines.Ubound+1)+" inlines"

for each a as MimeAttachmentMBS in m.Inlines
MsgBox "Inline: " + a.Filename
next

Inline items are like attachments, but shown in the email and normally referenced by ID from the html text.

See also:

Some examples using this method:

MimeEmailMBS.Inlines(index as Integer) as MimeAttachmentMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method EmailParser MBS CURL Plugin 15.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries inline by index.

Index is zero based.

See also:

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


The biggest plugin in space...