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




Gets or sets the client hostname or address when a specific interface binding is desired.

Syntax

Visual Basic (Declaration) 
<CategoryAttribute("Behavior")>
<DefaultValueAttribute()>
<DescriptionAttribute("The address of the client this operates from")>
Public Property Client As String
Visual Basic (Usage)Copy Code
Dim instance As Smtp
Dim value As String
 
instance.Client = value
 
value = instance.Client
C# 
[CategoryAttribute("Behavior")]
[DefaultValueAttribute()]
[DescriptionAttribute("The address of the client this operates from")]
public string Client {get; set;}
Managed Extensions for C++ 
[CategoryAttribute("Behavior")]
[DefaultValueAttribute()]
[DescriptionAttribute("The address of the client this operates from")]
public: __property string* get_Client();
public: __property void set_Client( 
   string* value
);
C++/CLI 
[CategoryAttribute("Behavior")]
[DefaultValueAttribute()]
[DescriptionAttribute("The address of the client this operates from")]
public:
property String^ Client {
   String^ get();
   void set (    String^ value);
}

Property Value

A string representing a host name or dot address if a specific interface binding is desired, or a zero-length string.

Example

The following example demonstrates use of the Smtp component when dealing with a client or server which does not use common protocol settings.
Visual BasicCopy Code
' Be sure to import the namespace by putting "Imports Dart.PowerTCP.Mail"
' at the top of your class.

' Set the username (usually not required).
Smtp1.Username = "myusername"

' Set the password (usually not required).
Smtp1.Password = "mypass"

' Set the client interface (this overrides the default interface)
Smtp1.Client = "111.222.111.222"
Smtp1.ClientPort = 8123

' Set the server
Smtp1.Server = "mail.test.com"

' Set the server port (this defaults to 25, the well-known port for SMTP)
Smtp1.ServerPort = 9876

' Send a message
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.

// Set the username (usually not required).
smtp1.Username = "myusername";

// Set the password (usually not required).
smtp1.Password = "mypass";

// Set the client interface (this overrides the default interface)
smtp1.Client = "111.222.111.222";
smtp1.ClientPort = 8123;

// Set the server
smtp1.Server = "mail.test.com";

// Set the server port (this defaults to 25, the well-known port for SMTP)
smtp1.ServerPort = 9876;

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

Remarks

Set this property to either a dot address ("111.111.111.111") or a hostname (which will be resolved by DNS).

Normally, the default interface binding is chosen. Use this property to override the default behavior, which is to bind to the first (default) adapter.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

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