Back to product page

Remove Method


Removes header from the collection.

Syntax

  • Basic
object.Remove (Index)
The Remove(object,Index) syntax has these parts:
objectAn expression evaluating to an object of type SmtpHdrs
IndexRequired. A Variant value. Integer value that specifies header index, string expression that specifies header name, or reference to Header object to remove.

Remarks

Remove method will delete specific Header object from the headers collection. Index parameter should be either Integer value that represents header index, or reference to Header object you wish to delete from the collection.

Integer value Index should be between 0 and Count-1, since unlike VB, wodSmtp starts counting headers from 0.

If Index doesn't exist in the collection, an error will be returned.

Platforms

Windows