CreateWithUserPassword(UserName: String; Password: String);
UserName. User name.
Password. User password.
The CreateWithUserPassword method determines user credentials for connection to server.
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: