C# Класс PostmarkDotNet.PostmarkMessageBase

A message destined for the Postmark service.
Показать файл Открыть проект

Открытые методы

Метод Описание
AddAttachment ( Stream contentStream, string attachmentName, string contentType = "application/octet-stream", string contentId = null ) : void

Adds a file attachment stream with inline support.

AddAttachment ( byte content, string contentType, string attachmentName ) : void

Adds a file attachment using a byte[] array

AddAttachment ( byte content, string contentType, string attachmentName, string contentId ) : void

Adds a file attachment using a byte[] array with inline support

AddAttachment ( string path ) : void

Adds a file attachment. Assumes the content type default of "application/octet-stream".

AddAttachment ( string path, string contentType ) : void

Adds a file attachment.

AddAttachment ( string path, string contentType, string contentId ) : void

Adds a file attachment with an inline image.

PostmarkMessageBase ( ) : System

Initializes a new instance of the PostmarkMessage class.

PostmarkMessageBase ( ) : System.Collections.Specialized

Initializes a new instance of the PostmarkMessage class.

Защищенные методы

Метод Описание
GetMailMessageBcc ( MailMessage message ) : void
GetMailMessageCc ( MailMessage message ) : void
GetMailMessageRecipients ( MailMessage message ) : void
GetMailMessageTo ( MailMessage message ) : void
GetStringFromView ( AttachmentBase view ) : string
ReadStream ( Stream input, int bufferSize ) : byte[]
ValidateAttachmentLength ( string content ) : void

Restrict attacments to 10 mb. The API will do this anyway but this is faster

ValidateAttachmentPath ( string path ) : void

Be sure the path to the attachment actually exists

resolveViewEncoding ( AttachmentBase view, Encoding fallbackEncoding ) : Encoding

Описание методов

AddAttachment() публичный Метод

Adds a file attachment stream with inline support.
public AddAttachment ( Stream contentStream, string attachmentName, string contentType = "application/octet-stream", string contentId = null ) : void
contentStream Stream An opened stream of the file attachments.
attachmentName string The file name assocatiated with the attachment.
contentType string The content type.
contentId string The ContentId for inlined images.
Результат void

AddAttachment() публичный Метод

Adds a file attachment using a byte[] array
public AddAttachment ( byte content, string contentType, string attachmentName ) : void
content byte
contentType string ContentID for inline images.
attachmentName string
Результат void

AddAttachment() публичный Метод

Adds a file attachment using a byte[] array with inline support
public AddAttachment ( byte content, string contentType, string attachmentName, string contentId ) : void
content byte
contentType string The content type.
attachmentName string
contentId string The ContentId for inline images.
Результат void

AddAttachment() публичный Метод

Adds a file attachment. Assumes the content type default of "application/octet-stream".
public AddAttachment ( string path ) : void
path string The full path to the file to attach
Результат void

AddAttachment() публичный Метод

Adds a file attachment.
public AddAttachment ( string path, string contentType ) : void
path string The full path to the file to attach
contentType string The content type.
Результат void

AddAttachment() публичный Метод

Adds a file attachment with an inline image.
public AddAttachment ( string path, string contentType, string contentId ) : void
path string The full path to the file to attach
contentType string The content type.
contentId string ContentID for inline images
Результат void

GetMailMessageBcc() защищенный Метод

protected GetMailMessageBcc ( MailMessage message ) : void
message MailMessage
Результат void

GetMailMessageCc() защищенный Метод

protected GetMailMessageCc ( MailMessage message ) : void
message MailMessage
Результат void

GetMailMessageRecipients() защищенный Метод

protected GetMailMessageRecipients ( MailMessage message ) : void
message MailMessage
Результат void

GetMailMessageTo() защищенный Метод

protected GetMailMessageTo ( MailMessage message ) : void
message MailMessage
Результат void

GetStringFromView() защищенный статический Метод

protected static GetStringFromView ( AttachmentBase view ) : string
view AttachmentBase
Результат string

PostmarkMessageBase() публичный Метод

Initializes a new instance of the PostmarkMessage class.
public PostmarkMessageBase ( ) : System
Результат System

PostmarkMessageBase() публичный Метод

Initializes a new instance of the PostmarkMessage class.
public PostmarkMessageBase ( ) : System.Collections.Specialized
Результат System.Collections.Specialized

ReadStream() защищенный статический Метод

protected static ReadStream ( Stream input, int bufferSize ) : byte[]
input Stream
bufferSize int
Результат byte[]

ValidateAttachmentLength() защищенный статический Метод

Restrict attacments to 10 mb. The API will do this anyway but this is faster
protected static ValidateAttachmentLength ( string content ) : void
content string
Результат void

ValidateAttachmentPath() защищенный статический Метод

Be sure the path to the attachment actually exists
protected static ValidateAttachmentPath ( string path ) : void
path string
Результат void

resolveViewEncoding() защищенный статический Метод

protected static resolveViewEncoding ( AttachmentBase view, Encoding fallbackEncoding ) : Encoding
view AttachmentBase
fallbackEncoding Encoding
Результат Encoding