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




Gets the status of the last operation with this MailAddress.

Syntax

Visual Basic (Declaration) 
Public Property ServerResponse As Response
Visual Basic (Usage)Copy Code
Dim instance As MailAddress
Dim value As Response
 
instance.ServerResponse = value
 
value = instance.ServerResponse
C# 
public Response ServerResponse {get; set;}
Managed Extensions for C++ 
public: __property Response* get_ServerResponse();
public: __property void set_ServerResponse( 
   Response* value
);
C++/CLI 
public:
property Response^ ServerResponse {
   Response^ get();
   void set (    Response^ value);
}

Property Value

The status of the last operation carried out on this MailAddress.

Example

The following example demonstrates verifying a list of email addresses.
Visual BasicCopy Code
' Be sure to import the namespace by putting "Imports Dart.PowerTCP.Mail"
' at the top of your class.

' Create a MailAddresses collection populated with some addresses
Dim ma As New MailAddresses("sales@dart.com,bad@fake.com,support@dart.com")

' Verify the addresses against the specified DNS servers
ma.Verify("206.64.128.5,198.6.1.2,198.6.1.3", 20000)

' Check the response to each address.
Dim m As MailAddress
For Each m In ma
   If m.ServerResponse.Code = 250 Then
      System.Diagnostics.Debug.WriteLine(m.Address + " is OK")
   Else
      System.Diagnostics.Debug.WriteLine(m.Address + " is bad")
   End If
Next
C#Copy Code
// Be sure to import the namespace by putting "using Dart.PowerTCP.Mail;"
// at the top of your class.

// Create a MailAddresses collection populated with some addresses
MailAddresses ma = new MailAddresses("sales@dart.com,bad@fake.com,support@dart.com");

// Verify the addresses against the specified DNS servers
ma.Verify("206.64.128.5,198.6.1.2,198.6.1.3", 20000);

// Check the response to each address.
foreach(MailAddress m in ma)
   if(m.ServerResponse.Code == 250)
      System.Diagnostics.Debug.WriteLine(m.Address + " is OK");
   else
      System.Diagnostics.Debug.WriteLine(m.Address + " is bad");

Remarks

After sending email using Smtp.Send or verifying email with MailAddresses.Verify, this will contain the server's response regarding this MailAddress.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

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