INetNetworkCredential.CreateWithUserPassword

Syntax

CreateWithUserPassword(UserName: String; Password: String);

Parameters

UserName - user name.

Password - user password.

Description

The CreateWithUserPassword method determines user credentials for connection to server.

Example

Sub UserProc;

Begin

SmtpClient := New NetSmtpClient.CreateWithHost("www.host.net");

Credent := New NetNetworkCredential.Create("myusername","mypwd","PROGNOZ");

Credent.CreateWithUserPassword("username_2","pwd_2");

SmtpClient.ThisHostCredentials("PLAIN") := Credent;

End Sub UserProc;

After executing the example the username_2 user credentials are used for connection to server.

See also:

INetNetworkCredential