Distinct offers Network Monitor, the ONLY natural language Protocol Analyzer, ONC RPC for C++, .NET and Java, and IntelliTerm, the fastest Terminal Emulator for TN3270, TN5250 and VT420 on the market.

Distinct VIT: MIME Control: OnExtract

   Products   Downloads   Sales   Support   About us
  VIT



        
 

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



Browse FAQ

Related Products
Mail Objects

Recommended Add-On
Network Monitor,
Protocol Analyzer


Raves
"The night before I went on summer holiday we had to make some 'last minute' configuration changes to approx. 300 routers, a tedious job to do manually with telnet. We went along with MS Excel containing a list of IP-adresses to the routers, and the VIT telnet-component. One hour later the VBA-application (small is beautiful) was working, and after another hour all of our routers were updated with the new configuration. I just say a big "Thanks" to you all for a good sleep that night."
Eirik Brendholen, Ergo Integration AS

"We conducted a test session to compare the performance of similar products, and Distinct's product was better!" [more]
Dr. Shyam Sunder, Carnegie Mellon University

"Together with Distinct, we were able to offer our users an ideal soution to enabling them to connect to Yahoo! Pager, and to do so both quickly and reliably." [more]
Brian Park,
Producer of Yahoo! Pager, Yahoo! Inc.


  8/20/2008   Legal notices | PRIVACY Policy | Networking News |