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

To execute the example, add a link to the Net system assembly.

Sub UserProc;
Begin
    SmtpClient := New CurlSmtpClient.CreateWithHost("www.host.net");
    Credent := New CurlNetworkCredential.Create("myusername","mypwd","DOMAIN");
    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