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

  • authenticationType
    Type: System..::.String
    A String that identifies the authentication scheme used when connecting to host using credential.

Version Information

Windows Phone OS

Supported in: 8.1

See Also

Reference

CredentialCache Class

Add Overload

System.Net Namespace