PowerTCP Mail for .NET
EnvelopeID Property
See Also  Send comments on this topic.
Dart.PowerTCP.Mail Namespace > DeliveryStatusNotification Class : EnvelopeID Property




Specifies the envelope identifier to be transmitted with the message, and returned with the DSN.

Syntax

Visual Basic (Declaration) 
Public Property EnvelopeID As String
Visual Basic (Usage)Copy Code
Dim instance As DeliveryStatusNotification
Dim value As String
 
instance.EnvelopeID = value
 
value = instance.EnvelopeID
C# 
public string EnvelopeID {get; set;}
Managed Extensions for C++ 
public: __property string* get_EnvelopeID();
public: __property void set_EnvelopeID( 
   string* value
);
C++/CLI 
public:
property String^ EnvelopeID {
   String^ get();
   void set (    String^ value);
}

Property Value

A string value representing the envelope identifier to send with the message.

Example

The following example demonstrates using the DeliveryStatusNotification class to send an email with DSN.
Visual BasicCopy Code
' Be sure to import the namespace by putting "Imports Dart.PowerTCP.Mail"
' at the top of your class.

' Specify a DSN ID to use.
Smtp1.DSN.EnvelopeID = "ID1234567"

' Specify to return the entire message instead of the headers.
Smtp1.DSN.ReturnMessage = True

' Send a DSN on failure or delay.
Smtp1.DSN.Type = DSNType.Delay Or DSNType.Failure

' Send a message
Smtp1.Server = "mail@test.com"
Smtp1.Send("you@test.com", "me@test.com", "Test", "test message")
C#Copy Code
// Be sure to import the namespace by putting "using Dart.PowerTCP.Mail;"
// at the top of your class.

// Specify a DSN ID to use.
smtp1.DSN.EnvelopeID = "ID1234567";

// Specify to return the entire message instead of the headers.
smtp1.DSN.ReturnMessage = true;

// Send a DSN on failure or delay.
smtp1.DSN.Type = DSNType.Delay | DSNType.Failure; 

// Send a message
smtp1.Server = "mail.test.com";
smtp1.Send("you@test.com", "me@test.com", "Test", "test message");

Remarks

When requesting a DSN, you can specify an identifier to track the status of a message. The value you specify as DeliveryStatusNotification.EnvelopeID, will be returned with the DSN in the "Original-Envelope-ID" header line. This value must be less than 100 characters.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 3.2
© 2010 Dart Communications. All Rights Reserved.