Framework EDI Reference. Methods and Properties
mailMessage. RequestMDN

Indicates to the server that a Message Disposition Notification (MDN) must be sent back as a response after receiving the message.

Syntax:

 

Returns:

lRetVal - Returns 1 if the operation is successful; otherwise zero (0) if the operation fails.

Remarks:

This method is mainly applicable to AS2 operations, and indicates to the server that an MDN must be sent back by writing a Disposition-Notification-To header in the message.

Disposition-notification-to: johns@example.com

The field value of the header (e.g. johns@example.com) MUST be present but should be ignored by the receiving server (as well as not complain of syntactical errors regarding the value).  This method replaces the following statement on how to request an MDN.

Dim oSubjMsg As Fredi.mailMessage
:
oSubjMsg.HeaderFieldValue("Disposition-Notification-To") = "johns@example.com"

This method should be one of the last to be called before the message is ready to be sent to the server.

Example:

Dim oMailDocument As Fredi.mailDocument
Dim oSubjMsg As Fredi.mailMessage

Set oMailDocument = oEdiDoc.GetMailDocument
Set oSubjMsg = oMailDocument.GetMessage

oSubjMsg.Import(sPath)

oSubjMsg.HeaderFieldValue("AS2-Version") = "1.0"
oSubjMsg.HeaderFieldValue("AS2-To") = "abc@example.com"
oSubjMsg.HeaderFieldValue("AS2-From") = "myMail@example.com"

' Encode the message to base 64
oSubjMsg.EncodingBase64 = True

' Request that an MDN be returned
oSubjMsg.RequestMDN()