Framework EDI Reference. Methods and Properties
mailMessage. RequestSignedMDN

Indicates to the server that a signed 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 a signed MDN must be returned after receiving and verifying the message.  It does this by writing the following headers in the message:

For example:

Disposition-notification-to: johns@example.com
Disposition-Notification-Options: signed-receipt-protocol=optional,pkcs7-signature; signed-receipt-micalg=optional,sha1

This method replaces the following statements on how to request a signed MDN from the server.

Dim oSubjMsg As Fredi.mailMessage
:
oSubjMsg.HeaderFieldValue("Disposition-Notification-To") = "johns@example.com"
oSubjMsg.HeaderFieldValue("Disposition-Notification-Options") = "signed-receipt-protocol=optional,pkcs7-signature; signed-receipt-micalg=optional,sha1"

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.RequestSignedMDN()