Partager via


MDNRequested Property

MDNRequested Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Indicates whether a Mail Delivery Notification (MDN) report is requested for a message.

Applies To

IMessage Interface

Type Library

Microsoft CDO for Exchange 2000 Library

DLL Implemented In

CDOEX.DLL

Syntax

[Visual Basic]Property MDNRequested As Boolean

[C++]HRESULT get_MDNRequested(VARIANT_BOOLpVal);
HRESULT put_MDNRequested(VARIANT_BOOL Val);

Parameters

  • pVal
    Returns the value of the MDNRequested property as a reference to a VARIANT_BOOL.
  • Val
    Sets the value of the MDNRequested property to the value of the VARIANT_BOOL.

Remarks

An 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, or deleted without display, or if a recipient refused to send MDNs. The message sender or an intermediary Message Transfer Agent can 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 MDN for a message, set the urn:schemas:mailheader:disposition-notification-to header field to the sender's e-mail 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.

Examples

' 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@example.com" .fields(cdoSendUserReplyEmailAddress) = "user2@example.com" .fields.update end with

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

wscript.echo .getstream.readtext ' .send

' next, send the message to others without MDNs

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

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

end sub

[Visual Basic]

See the VBScript example.

[C++]

See the VBScript example.

See Also

DSNOptions Property

Send us your feedback about the Microsoft Exchange Server 2003 SDK.

Build: June 2007 (2007.618.1)

© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.