MailMill COM 1.0 Documentation

Load MailAttachment Method:
Set the attachment data, content-type and file name from an existing file.
Syntax:
[C++]
HRESULT Load(BSTR file);
[VB]
Sub Load(file As String);
Parameter:
file
Specifies the full or relative path of the file to load.
Remark:
Use this method to quickly an easily build a MailAttachment object from a file. The Data property is set to a byte array containg the file data, the Type property is calculated from the file name, and the Name property is set to the file name. Note that all these properties can be modified after calling the Load method.
Example:
[VB]
Dim oMail As New Mail
Dim oAttachment As New MailAttachment
oAttachment.Load "c:\documentations\product_specs.pdf"
oMail.Attachments.Add oAttachment
See also:
MailAttachment Object

 

Copyright © Active+ Software 2005 - All rights reserved