CredentialCache.Add Method (String, Int32, String, NetworkCredential)
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Adds a NetworkCredential instance for use with SMTP to the credential cache and associates it with a host computer, port, and authentication protocol. Credentials added using this method are valid for SMTP only. This method does not work for HTTP or FTP requests.
Namespace: System.Net
Assembly: System.Net (in System.Net.dll)
Syntax
Public Sub Add ( _
host As String, _
port As Integer, _
authenticationType As String, _
credential As NetworkCredential _
)
public void Add(
string host,
int port,
string authenticationType,
NetworkCredential credential
)
Parameters
- host
Type: System..::.String
A String that identifies the host computer.
- port
Type: System..::.Int32
A Int32 that specifies the port to connect to on host.
- authenticationType
Type: System..::.String
A String that identifies the authentication scheme used when connecting to host using credential.
- credential
Type: System.Net..::.NetworkCredential
The NetworkCredential to add to the credential cache.
Version Information
Windows Phone OS
Supported in: 8.1