40 lines
1.4 KiB
C#
40 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace Sarand.Net.Standard.Base.Email
|
|
{
|
|
//=======================================================================
|
|
public class SaEmailAttachmentData
|
|
{
|
|
//-------------------------------------------------------------------
|
|
// Construction.
|
|
public SaEmailAttachmentData() : this("", "") { }
|
|
public SaEmailAttachmentData(String mediaType, String mediaSubtype)
|
|
{
|
|
ContentType.MediaType = mediaType;
|
|
ContentType.MediaSubtype = mediaSubtype;
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Properties.
|
|
public bool Inline { get; set; }
|
|
/// <summary>Filename - identity for non-inline attachments.</summary>
|
|
public String Filename { get; set; }
|
|
/// <summary>ContentId - identity for inline attachments.</summary>
|
|
public String ContentId { get; set; }
|
|
/// <summary>Attachment data - as byte array.</summary>
|
|
public byte[] Data { get; set; }
|
|
public class ContentTypeData
|
|
{
|
|
public String MediaType { get; set; } = "application";
|
|
public String MediaSubtype { get; set; } = "octet-stream";
|
|
}
|
|
/// <summary>Content type identified as Media and sub media types, eg. 'Image','png'.</summary>
|
|
public ContentTypeData ContentType { get; } = new ContentTypeData();
|
|
|
|
//-------------------------------------------------------------------
|
|
}
|
|
//=======================================================================
|
|
}
|