AttachmentContentLocation Property
Gets the content location of the attachment.

Namespace: MailBee.Mime
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax
public string ContentLocation { get; }

Property Value

Type: String
A string containing the attachment's content location taken from Content-Location header, or an empty string if Content-Location header is not set.
Remarks
ContentLocation, if present, is typically a URL to the resource (where resource is the attachment data). Some mail clients, however, place Content-ID value in ContentLocation. Thus, if Content-ID is expected and ContentID header is missing while ContentLocation is present, MailBee uses its value as Content-ID of the resource.
Examples
This sample loads the message from .EML file and displays content location of each attachment of the message.
// To use the code below, import MailBee namespaces at the top of your code.
using MailBee;
using MailBee.Mime;

// The actual code (put it into a method of your class)

// Load the message from file.
MailMessage msg = new MailMessage();
msg.LoadMessage(@"C:\Docs\TestMail.eml");

// For every attachment...
foreach (Attachment attach in msg.Attachments)             
{
    // ...show attachment content location.
    Console.WriteLine("The location is " + attach.ContentLocation);
}
See Also