AddHeader Method

Add customized header to current email.

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


Header's name.
Header's value.

Return Value

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


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