Adds or updates a message header definition.
Syntax:
<lRetVal> = object.AddDefinedHeader (<sFieldName>, <FieldType>, <Requirement>, [<lMaximumUse>])
Parameters:
Returns:
If successful returns 1 otherwise 0 if failed.
Remarks
The following is a list of predefined headers that are currently recognized. The values of these headers are parsed according to their type. When reading a message, a header not already on the list is automatically added so that it is recognized on subsequent encounters. The automatic addition of an undefined header will generate a warning.
When manually creating or modifying a message, only headers having definitions below and those already added automatically, can be added to the message. To manually add a new unique header to the message that is not on the list, use AddDefinedHeader to define the type of header first, and then add the header.
If AddDefinedHeader is used on an existing header definition, the properties of the existing definition is overwritten. For example, to change the type of a "Date" header from HeaderType_Date to HeaderType_FieldText, the method is used as follows:
AddDefinedHeader("Date", HeaderType_FieldText, Requirement_Optional)
Header Field Name Header Type All field names starting with “X-” or “x-”. HeaderType_FieldText AS2-From HeaderType_EdiIntValue AS2-To HeaderType_EdiIntValue AS2-Version HeaderType_Version AS3-From HeaderType_EdiIntValue AS3-To HeaderType_EdiIntValue AS3-Version HeaderType_Version Bcc HeaderType_Address Cache-Control HeaderType_FieldText Cc HeaderType_Address Comment HeaderType_FieldText Comments HeaderType_FieldText Content-Description HeaderType_ContentDescription Content-Disposition HeaderType_ContentDisposition Content-ID HeaderType_ContentID Content-Length HeaderType_FieldText Content-Transfer-Encoding HeaderType_ContentTransferEncoding Content-Type HeaderType_ContentType Date HeaderType_Date Disposition HeaderType_Disposition Disposition-Notification-Options HeaderType_Parameters Disposition-Notification-To HeaderType_Group Encrypted HeaderType_WordList Error HeaderType_FieldText Failure HeaderType_FieldText Final-Recipient HeaderType_LabelAtomText From HeaderType_Mailbox Host HeaderType_FieldText In-Reply-To HeaderType_PhraseMessageID Keywords HeaderType_PhraseList MDN-Gateway HeaderType_LabelAtomText Message-ID HeaderType_MessageID MIME-Version HeaderType_Version Original-Message-ID HeaderType_MessageID Original-Recipient HeaderType_LabelAtomText Receipt-Delivery-Option HeaderType_URI Received HeaderType_Received Received-Content-MIC HeaderType_MICValue References HeaderType_PhraseMessageID Reply-To HeaderType_Address Reporting-UA HeaderType_LabelTextText Resent-Bcc HeaderType_Address Resent-Cc HeaderType_Address Resent-Date HeaderType_Date Resent-From HeaderType_MailBox Resent-Sender HeaderType_MailBox Resent-To HeaderType_Address Resent-Reply-To HeaderType_Address Resent-Message-ID HeaderType_MessageID Return-path HeaderType_RouteAddr Sender HeaderType_MailBox Subject HeaderType_FieldText To HeaderType_Address User-Agent HeaderType_FieldText Warning HeaderType_FieldText
Samples