EmailMessage.Attachments

From Xojo Documentation

Property (As EmailAttachments() )
aEmailMessage.Attachments = newEmailAttachments()Value
or
EmailAttachments()Value = aEmailMessage.Attachments

Supported for all project types and targets.

The array of EmailAttachments that are attached to this email message.

Example

Var mail As EmailMessage
Var file As EmailAttachment
.
.
// add attachments
file = New EmailAttachment
file.ContentEncoding="UTF8"
file.LoadFromFile(GetFolderItem("MyAttachment.txt")
mail.Attachments.Add(file)