C# Class PostmarkDotNet.PostmarkMessageBase

A message destined for the Postmark service.
Afficher le fichier Open project: wildbit/postmark-dotnet

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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

Method Details

AddAttachment() public méthode

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.
Résultat void

AddAttachment() public méthode

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
Résultat void

AddAttachment() public méthode

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.
Résultat void

AddAttachment() public méthode

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
Résultat void

AddAttachment() public méthode

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.
Résultat void

AddAttachment() public méthode

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
Résultat void

GetMailMessageBcc() protected méthode

protected GetMailMessageBcc ( MailMessage message ) : void
message MailMessage
Résultat void

GetMailMessageCc() protected méthode

protected GetMailMessageCc ( MailMessage message ) : void
message MailMessage
Résultat void

GetMailMessageRecipients() protected méthode

protected GetMailMessageRecipients ( MailMessage message ) : void
message MailMessage
Résultat void

GetMailMessageTo() protected méthode

protected GetMailMessageTo ( MailMessage message ) : void
message MailMessage
Résultat void

GetStringFromView() protected static méthode

protected static GetStringFromView ( AttachmentBase view ) : string
view AttachmentBase
Résultat string

PostmarkMessageBase() public méthode

Initializes a new instance of the PostmarkMessage class.
public PostmarkMessageBase ( ) : System
Résultat System

PostmarkMessageBase() public méthode

Initializes a new instance of the PostmarkMessage class.
public PostmarkMessageBase ( ) : System.Collections.Specialized
Résultat System.Collections.Specialized

ReadStream() protected static méthode

protected static ReadStream ( Stream input, int bufferSize ) : byte[]
input Stream
bufferSize int
Résultat byte[]

ValidateAttachmentLength() protected static méthode

Restrict attacments to 10 mb. The API will do this anyway but this is faster
protected static ValidateAttachmentLength ( string content ) : void
content string
Résultat void

ValidateAttachmentPath() protected static méthode

Be sure the path to the attachment actually exists
protected static ValidateAttachmentPath ( string path ) : void
path string
Résultat void

resolveViewEncoding() protected static méthode

protected static resolveViewEncoding ( AttachmentBase view, Encoding fallbackEncoding ) : Encoding
view AttachmentBase
fallbackEncoding Encoding
Résultat Encoding