MailMessage.Fields Eigenschaft

Definition

Ruft eine Auflistung von Objekten ab, die Microsoft CDO-Feldern (Collaboration Data Objects) zugeordnet sind. Empfohlene Alternative: System.Net.Mail.

public:
 property System::Collections::IDictionary ^ Fields { System::Collections::IDictionary ^ get(); };
public System.Collections.IDictionary Fields { get; }
member this.Fields : System.Collections.IDictionary
Public ReadOnly Property Fields As IDictionary

Eigenschaftswert

IDictionary

Eine IDictionary-Auflistung von Objekten, die CDO-Feldern (Collaboration Data Objects) zugeordnet sind.

Beispiele

Im folgenden Codebeispiel wird die Verwendung der Fields Eigenschaft veranschaulicht, um Ihren Benutzernamen und Ihr Kennwort an einen Smtp-Server (Simple Mail Transfer Protocol) für die Authentifizierung zu senden.

// Use the Fields property to add authentication, your username, and your password.
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1");    
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "marsha"); 
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "secret");
' Use the Fields property to add authentication, your username, and your password.
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1")
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "marsha")
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "secret")

Hinweise

Die Fields Eigenschaft wird verwendet, um erweiterte Eigenschaften für Zusammenarbeitsdatenobjekte (CDO) festzulegen. Weitere Informationen zu CDO finden Sie unter "Collaboration Data Objects and Configuration CoClass".

Gilt für