AddHeader Method


Add customized header to current email.

[Syntax]
Visual C++: HRESULT AddHeader( BSTR strHeader, BSTR strValue, long* pVal )
Visual Basic: AddHeader( strHeader As String, strValue As String ) As Long

Parameters

strHeader
Header's name.
strValue
Header's value.

Return Value

If this method succeeds, the return value is zero; otherwise the return value is non-zero.

Remarks

AddHeader method provides some advanced functions. For example, developer can use AddHeader to add a customized header as follows:
' inserts a auto-submitted header to indicate that
' the message was originated by an automatic process, or an automatic
' responder, rather than by a human
oSmtp.AddHeader "auto-submitted", "auto-generated"
    

See Also

ClearHeader Method
ClearAttachment Method