|
Summary
Receive information about extracted message.
Description
When a message is extracted the To, From, Cc, Bcc and Subject fields of the message are
delivered to the application in OnRecvAddrField events. This event delivers the value and
the encoding type of each field. This event will be fired at least once for each of the To
and From fields. This event will occur after the application has called the
ExtractMessageEnd.
The Field parameter will contain "To", "From",
"Cc", "Bcc" or "Subject". The Value field will
contain the value of the respective header fields, the Charset field may specify
the character set of the respective fields, and this field will be NULL if the Value
field is not encoded. If the Value field is encoded then the Encoding parameter
will contain either ADDR_BASE64_ENCODED or ADDR_QUOTED_ENCODED, if it is not encoded then
the Encoding parameter will contain ADDR_NO_ENCODING. This event may be fired
several times with the same field but with different values and encoding types.
Example
Sub Mime_OnRecvAddrField (Field As String, Value As
String, Charset As String, Encoding As Integer)
' display
Message = "Encoding Address
" & Chr(10) & Chr(10)
' filename
Message = Message & "Field: " & Field & " " & Value
& Chr(10)
' encoding type
If Encoding = BASE64_ENCODED Then
Message = Message & "Encoding: Base64 Encoding" & Chr(10)
Else If Encoding = QUOTED_ENCODED Then
Message = Message & "Encoding: Quoted Encoding" & Chr(10)
Else
Message = Message & "Encoding: None" & Chr(10)
End If
' character set
Message = Message & "Character Set: " & Charset & Chr(10)
' display message
MsgBox Message, 64, "Sample Program"
End Sub
|