|
Summary
Send the body as file.
Description
The BodyAsFile property is used to indicate whether the body of the attachment or
message is sent in the form of a file or as a buffer. This property is valid only if the
UseProperty is set to True, otherwise the application must set the IsFile
parameter. The UseProperty property should normally be set to False, and the IsFile
parameter should be used instead of this property. See the UseProperty for information on
when to use this property.
The application must set this property inside the OnSetBody event (and the deprecated
OnBody event), during the create message process, only if the UseProperty is set to True.
It should be set to 1 if a filename is passed to the MIME ActiveX control or else it
should be set to 0.
This property can be changed only at run time inside the OnSetBody or OnBody events.
There is no default value for this property.
Example
Sub Mime_OnSetBody (Buffer As String, Length As Integer, IsFile As
Integer)
' send message body
If MsgBodyDone = False Then
Mime.SendData = Message
BodyAsFile = 0 ' message body
MsgBodyDone = True
Exit Sub
End If
' send attachment filename
If AttachDone = False And HeaderIndex <> 0 Then
Mime.SendData = HeaderInfo(Indx).FilePath
BodyAsFile = 1 ' attachment
AttachDone = True
Else
Mime.SendData = "" ' end of body or attachment
BodyAsFile = 0
End If
End Sub
|