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: OnEncodeField

   Products   Downloads   Sales   Support   About us
  VIT
 



        
 

Summary

Obtain header field information

Description

The OnEncodeField will be fired when the EncodeHdrField method is called to get the data to be encoded.

In the OnEncodeField event the application should set the Value parameter should be set to the value of the header fields, the Charset parameter may be set to the character set of the respective fields, this parameter will be ignored if the Value doesn't need to be encoded. If the Value field needs to be encoded then the Encoding parameter should contain either ADDR_BASE64_ENCODED or ADDR_QUOTED_ENCODED, if encoding is not necessary the Encoding parameter should contain ADDR_NO_ENCODING. If the application wants to use more than one type of encoding for a field then it may set these parameters in multiple OnEncodeField events with different values and corresponding encoding for that value each time.

The IMAP ActiveX control will fire this event, to get data to encode, until the Value parameter is set to an empty string and the Length parameter is set to 0.

In some environments such as Visual J++, the new value assigned to the Value, Length, Charset and Encoding parameters can not be successfully retrieved by the control. In these cases set UseProperty to True, and assign the value to the FieldValue property instead of the Value parameter, similarly assign the charset to the FieldCharset property, the encoding to the FieldEncoding parameter and the length parameter will be ignored. The UseProperty property must be set to True before attempting to create a message.

Example

Private Sub MIME_OnEncodeField(Value As String, Length As Integer, Charset As Integer, Encoding As Integer)

If (initial)

Value = "This file contains:"

Length = Len (Value)

Charset = "us-ascii"

Encoding = ADDR_NO_ENCODING

initial = False

Else

Value = "lots of confidential information."

Length = Len (Value)

Charset = "us-ascii"

Encoding = ADDR_BASE64_ENCODING

Done = True

EndIf

If (Done) Then

' All data given

Value = ""

Length = 0

End If

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.


  10/14/2008   Legal notices | PRIVACY Policy | Networking News |