Dart Smtp, Pop, Imap Controls
Remove Method
LabelConstants specifies the symbolic name for the header field to be removed. If msgNull, the Index parameter will be used to specify the header field to be removed.
Optional. Identifies a header field by position in the collection. When using this parameter Label must be set to msgNull.
Description
Remove a header field from the collection.
Syntax
Visual Basic
Public Function Remove( _
   ByVal Label As LabelConstants, _
   Optional ByVal Index As Long = 0 _
) As String
Parameters
Label
ValueDescription
msgAlsoControl"Also-Control:"
msgAlternateRecipient"Alternate-Recipient:"
msgApparentlyTo"Apparently-To:"
msgApproved"Approved:"
msgArticleNames"Article-Names:"
msgArticleUpdates"Article-Updates:"
msgAutoForwarded"Auto-Forwarded:"
msgComments"Comments:"
msgContentBase"Content-Base:"
msgContentConversion"Content-Conversion:"
msgContentDescription"Content-Description:"
msgContentDisposition"Content-Disposition:"
msgContentID"Content-ID:"
msgContentIdentifier"Content-Identifier:"
msgContentLanguage"Content-Language:"
msgContentLength"Content-Length:"
msgContentLocation"Content-Location:"
msgContentMD5"Content-MD5:"
msgContentReturn"Content-Return:"
msgContentSGMLEntity"Content-SGML-Entity:"
msgContentTransferEncoding"Content-Transfer-Encoding:"
msgContentType"Content-Type:"
msgControl"Control:"
msgConversion"Conversion:"
msgConversionWithLoss"Conversion-With-Loss:"
msgDate"Date:"
msgDeliveryDate"Delivery-Date:"
msgDeliveryReport"Delivery-Report:"
msgDiscardedX400IPMSExtensions"Discarded-X400-IPMS-Extensions:"
msgDiscardedX400MTSExtensions"Discarded-X400-MTS-Extensions:"
msgDiscloseRecipients"Disclose-Recipients:"
msgDistribution"Distribution:"
msgDLExpansionHistoryIndication"DL-Expansion-History-Indication:"
msgEncoding"Encoding:"
msgErrorsTo"Errors-To:"
msgExpires"Expires:"
msgFax"Fax:"
msgFcc"Fcc:"
msgFollowupTo"Followup-To:"
msgForComment"For-Comment:"
msgForHandling"For-Handling:"
msgFrom"From:"
msgGenerateDeliveryReport"Generate-Delivery-Report:"
msgImportance"Importance:"
msgIncompleteCopy"In-Reply-To:"
msgInReplyTo"Incomplete-Copy:"
msgKeywords"Keywords:"
msgLanguage"Language:"
msgLines"Lines:"
msgMailer"Mailer:"
msgMailSystemVersion"Mail-System-Version:"
msgMessageID"Message-ID"
msgMessageType"Message-Type:"
msgMIMEVersion"MIME-Version:"
msgNewsgroups"Newsgroups:"
msgNullN/A
msgObsoletes"Obsoletes:"
msgOrganisation"Organisation:"
msgOrganization"Organization:"
msgOriginalEncodedInformationTypes"Original-Encoded-Information-Types:"
msgOriginatingClient"Originating-Client:"
msgPath"Path:"
msgPhone"Phone:"
msgPrecedence"Precedence:"
msgPreventNonDeliveryReport"Prevent-NonDelivery-Report:"
msgPriority"Priority:"
msgReceived"Received:"
msgReferences"References:"
msgReplyBy"Reply-By:"
msgReplyTo"Reply-To:"
msgReturnPath"Return-Path:"
msgReturnReceiptTo"Return-Receipt-To:"
msgSeeAlso"See-Also:"
msgSender"Sender:"
msgSensitivity"Sensitivity:"
msgStatus"Status:"
msgSubject"Subject:"
msgSummary"Summary:"
msgSupersedes"Supersedes:"
msgTelefax"Telefax:"
msgX400ContentReturn"X400-Content-Return:"
msgXMailer"X-Mailer:"
msgXNewsreader"X-Newsreader:"
msgXref"Xref:"
LabelConstants specifies the symbolic name for the header field to be removed. If msgNull, the Index parameter will be used to specify the header field to be removed.
Index
Optional. Identifies a header field by position in the collection. When using this parameter Label must be set to msgNull.
Return Value
The removed header field.
Remarks
This method removes the first header field matching Label or the header field at Index in the collection.

Error Codes

This method may generate the following error code (refer to MailErrorConstants for a complete list of error codes):

Example
Private Sub Command1_Click()
	Dim Msg As New Message
	Msg.Load "C:\Temp\Test.msg"
	' view the headers
	Text1.Text = Msg.Header.All
	' remove the Content-Type header field
	' and then view the headers less the Content-Type header
	Msg.Header.Remove msgContentType
	Text2.Text = Msg.Header.All
	' remove the first header field in the collection
	' and then view the headers less the Content-Type and first header
	Msg.Header.Remove msgNull, 1
	Text3.Text = Msg.Header.All
End Sub
See Also

HeaderFields Collection  | HeaderFields Members


PowerTCP SSL for ActiveX Documentation Version 2.2.1
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic