|
Summary
Obtain information about extracted message. This event has been deprecated. Information
about the extracted message is now delivered in the OnRecvHeader event.
Description
The OnExtract event occurs in response to setting the Action property to ACTION_EXTRACT
(or the Extract method) or the ExtractX method. This event will occur during the extract
message.
The MIME ActiveX control in case of ACTION_EXTRACT (or method Extract) will first
extract the message header and body and save it to a file. The OnExtract event will be
fired after this. Next, the attachments will be extracted, decoded if necessary and saved
to a file. The OnExtract event will be fired for each attachment.
In case of the method ExtractX the Mime ActiveX control will extract the message but
instead of saving it to a file will fire the OnData event after each OnExtract event to
deliver the contents of the message body. It will do the same thing for attachments.
The application can check the FileName property to determine the name of the file
containing the extracted information in case of ACTION_EXTRACT (or method Extract). If the
action is ACTION_EXTRACT_X (or method ExtractX) the FileName property will either contain
the name of the attachment file if present in the header or else it will be empty. The
Encoding property, ContentType and Subtype properties will contain the appropriate
information. The OnData event will be fired next if the action is set to ACTION_EXTRACT_X
(or method ExtractX) to deliver the contents of the message body or of the attachments.
The value of these properties will change with each occurrence of the OnExtract event.
The Level parameter will contain the level of nesting for multipart nested
messages. Otherwise it will be 0.
For a partial message, the OnExtract event will only be fired when all the parts have
been extracted and reassembled to form the original file. Otherwise an OnError event will
occur to indicate that a partial message was extracted.
Example
Sub Mime_OnExtract (Level As Integer)
' display
Message = "Extracted...." + Chr(10) + Chr(10)
' filename
Message = Message & "FileName: " & Mime.FileName & Chr(10)
Message = Message & "Level: " & Level & Chr(10)
' encoding type
Message = Message & "Encoding: " & Mime.Encoding & Chr(10)
' content type
Message = Message & "ContentType: " & Mime.ContentType & Chr(10)
' subtype
Message = Message & "SubType: " & Mime.Subtype & Chr(10)
' display message
MsgBox Message, 64, "Sample Program"
End Sub
|