Adds a header to the message.
Syntax:
Parameters:
- sName – Name of the header to add.
- sValue – Value of the header.
Returns:
Returns 1 if the operation is successful; otherwise returns 0 if the operation fails.
Example
Dim oEdiDoc As Fredi.ediDocument
Dim oMailDocument As Fredi.mailDocument
Dim oMessage As Fredi.mailMessage
' Create instance of Framework EDI.
Set oEdiDoc = New Fredi.ediDocument
' Get internet mail document object
Set oMailDocument = oEdiDoc.GetMailDocument
' Load the mail document
oMailDocument.Load App.Path & "\SampleMail.TXT"
' Get top level message of the document, and get the message.
Set oMessage = oMailDocument.GetMessage
' Add the "To" header to the message.
oMessage.AddHeader "To", "somebody@global.com"
oMessage.Save App.Path & "\Output.TXT"
MsgBox "Done"
Samples