AttachmentContentLocation Property |
Gets the content location of the attachment.
Namespace: MailBee.MimeAssembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax public string ContentLocation { get; }
Public ReadOnly Property ContentLocation As String
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.
using MailBee;
using MailBee.Mime;
MailMessage msg = new MailMessage();
msg.LoadMessage(@"C:\Docs\TestMail.eml");
foreach (Attachment attach in msg.Attachments)
{
Console.WriteLine("The location is " + attach.ContentLocation);
}
Imports MailBee
Imports MailBee.Mime
Dim msg As New MailMessage
msg.LoadMessage("C:\Docs\TestMail.eml")
For Each attach As Attachment In msg.Attachments
Console.WriteLine("The location is " & attach.ContentLocation)
Next
See Also