DispositionTypeNames.Inline Veld

Definitie

Hiermee geeft u op dat de bijlage moet worden weergegeven als onderdeel van de hoofdtekst van het e-mailbericht.

public: System::String ^ Inline;
public const string Inline;
val mutable Inline : string
Public Const Inline As String 

Waarde van veld

Voorbeelden

In het volgende codevoorbeeld wordt het verwijderingstype voor een bijlage ingesteld.

public static void CreateMessageInlineAttachment3(string server, string
textMessage)
{
    // Create a message and set up the recipients.
    MailMessage message = new MailMessage(
       "jane@contoso.com",
       "ben@contoso.com",
       "An inline text message for you.",
       "Message: ");

    // Attach the message string to this email message.
    Attachment data = new Attachment(textMessage, MediaTypeNames.Text.Plain);
    // Send textMessage as part of the email body.
    message.Attachments.Add(data);
    ContentDisposition disposition = data.ContentDisposition;
    disposition.DispositionType = DispositionTypeNames.Inline;
    //Send the message.
    // Include credentials if the server requires them.
    SmtpClient client = new SmtpClient(server);
    client.Credentials = (ICredentialsByHost)CredentialCache.DefaultNetworkCredentials;
    client.Send(message);
    data.Dispose();
}

Van toepassing op

Zie ook