AddHeader Method

<< Click to Display Table of Contents >>

Navigation:  Reference > MailMessage >

AddHeader Method

 

AddHeader method adds header value to e-mail message.

 

Syntax

 

[Visual Basic]


Sub AddHeader(strHeader As String, strValue As String)

 

Example:

 

objMailMessage.AddHeader "X-Mailer", "My Email Application 1.0"

 

[VBScript]


Sub AddHeader(strHeader, strValue)

 

Example:

 

objMailMessage.AddHeader "X-Mailer", "My Email Application 1.0"

 

[C#]


void AddHeader(string strHeader, string strValue);

 

Example:

 

objMailMessage.AddHeader( "X-Mailer", "My Email Application 1.0" );

 

[C++]


HRESULT AddHeader(BSTR strHeader, BSTR strValue);

 

Example:

 

spMailMessage->AddHeader("X-Mailer", "My Email Application 1.0");

 

 

Parameters

 

strHeader [in]

String.

 

strValue [in]

String.

 

Return value

 

None.

 

Remarks

 

Use AddHeader method to add custom header and its value to the e-mail message. Most common header is "X-Mailer", it contains name of an application that sent an e-mail.