RemoveHeader Method

Remove specified header item from current email.

[Syntax]
C++: HRESULT RemoveHeader( BSTR bstrKey )
Visual basic: RemoveHeader( bstrKey As String )
C#: void RemoveHeader( string bstrKey )

Parameters

bstrKey

Header name.

Remarks

This method can remove specified header item from current email. For example, you can remove "To" header to make recipient invisible.

Usage Example

[VBScript]
Dim oMsg
Set oMsg = CreateObject("ANPOP.POPMSG")

If oMsg.ImportFile("c:\test.eml") = 0 Then
  oMsg.RemoveHeader "X-Priority"  'change this email priority
  oMsg.AddHeader "X-Priority", "1 (Highest)"  
  oMsg.ExportFile "c:\test.eml" 'save this email to take effect
Else 
  WScript.Echo "error with ImportFile"
End If

See Also

GetHeaderItem Method
AddHeader Method


2001-2007 © Copyright AdminSystem Software Limited. All rights reserved.