Platform SDK: Exchange 2000 Server

MDNRequested Property

[This is preliminary documentation and subject to change.]

Indicates whether a Message Disposition Notification (MDN) report is requested for a message.

[Visual Basic]
Property MDNRequested as Boolean
[C++]
HRESULT get_MDNRequested(VARIANT_BOOL* pVal);
HRESULT put_MDNRequested(VARIANT_BOOL Val);
[IDL]
HRESULT [propget] MDNRequested([out,retval] VARIANT_BOOL* pVal);
HRESULT [propput] MDNRequested([in] VARIANT_BOOL Val);

Remarks

A Message Disposition Notification (MDN) is a request for disposition information from a recipient after the message has been successfully delivered. This disposition might include whether the message was displayed, printed, deleted without display, or a recipient's refusal to send MDNs. The message sender or an intermediary Message Transfer Agent may request MDNs. The returned MDN report message is nested in a message with content-type of multipart/report. RFC 2298 describes MDNs, their function and format.

To request an MSN for a message, set the urn:schemas:mailheader:disposition-notification-to header field to the sender's email address. Optionally, set the urn:schemas:mailheader:disposition-notification-options header field to the appropriate value. Then send the message. To remove a previously added MDN header field, delete it using the IMessage.Fields.Delete method.

Example

[VBScript]
' WSH Source file.
' Assume 
'   <reference object="adodb.record"/>
'   <reference object="cdo.message"/>
' exist to resolve type names using the
' type libraries.

sub mdnexample()

 set msg = createobject("cdo.message")

 with msg
   set conf = .configuration
   with conf
     .fields(cdoSendEmailAddress)          = "user1@microsoft.com"
     .fields(cdoSendUserReplyEmailAddress) = "user2@microsoft.com"
     .fields.update
   end with

   .to            = "user3@microsoft.com"
   .from          = "user1@microsoft.com"
   .subject       = "Need to know you got this."
   .textbody      = "here is the important message."
   .mdnrequested  = true
   .fields(cdoDispositionNotificationTo) = "user1@microsoft.com"
   .fields.update

   wscript.echo .getstream.readtext
   ' .send 

  ' next, send the message to others without MDNs

  .fields.delete(cdoDispositionNotificationTo)
  .fields.update
  .To             = "user4@microsoft.com"

  wscript.echo .getstream.readtext
  ' .send
 end with

end sub

[Visual Basic]
See the VBScript example.
[C++]
See the VBScript example.

See Also

IMessage.DSNOptions Property