| Visual Basic (Declaration) | |
|---|---|
Public Enum DSNType Inherits System.Enum | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As DSNType | |
| C# | |
|---|---|
public enum DSNType : System.Enum | |
| Managed Extensions for C++ | |
|---|---|
__value public enum DSNType : public System.Enum | |
| C++/CLI | |
|---|---|
public enum class DSNType : public System.Enum | |
| Member | Description |
|---|---|
| Default | Directs the server to follow its default policy for DSN. |
| Delay | Requests DSN for delayed delivery when success/failure information is not known. |
| Failure | Requests DSN for failure of delivery. |
| Never | Directs the server not to send DSN under any circumstances. |
| Success | Requests DSN for successful delivery. |
The following example demonstrates using the DeliveryStatusNotification class to send an email with DSN.
| Visual Basic | Copy 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"); | |
When requesting a DSN, the DeliveryStatusNotification.Type property specifies the conditions under which a DSN will be sent. These types are additive, so if you want a DSN response on Failure, Success, and Delivery, then set DSN.Type=DSNType.Failure+DSNType.Success+DSNType.Delay
System.Object
System.ValueType
System.Enum
Dart.PowerTCP.Mail.DSNType
Target Platforms: Microsoft .NET Framework 2.0