mail

package
v0.0.0-...-d62ea78 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EncodingMultipartWriter

type EncodingMultipartWriter struct {
	// contains filtered or unexported fields
}

EncodingMultipartWriter contains headers and information needed to write a MIME Multipart message

func NewEncodingMultipartWriter

func NewEncodingMultipartWriter(w io.Writer, multitype, protocol string, extraHeaders map[string]string) *EncodingMultipartWriter

NewEncodingMultipartWriter returns a new encoding multipart writer of the given type writing to w. The multitype can be for example "mixed", "alternative", or "encrypted". Optionally, a protocol for the Content-Type header can be given, for example "application/pgp-encrypted" The writer defines the headers "Mime-Version", "Content-Type" and "Content-Transfer-Encoding". Additional headers can be passed via the extraHeaders field. The extraHeaders field takes precedence.

func (*EncodingMultipartWriter) Close

func (w *EncodingMultipartWriter) Close() error

Close writes the trailing information for an multipartWriter

func (*EncodingMultipartWriter) WriteAttachedFile

func (w *EncodingMultipartWriter) WriteAttachedFile(name, mimeType, description string) (io.Writer, error)

WriteAttachedFile writes a multipart header for an attached file and provides a writer for the file contents

func (*EncodingMultipartWriter) WriteInlineFile

func (w *EncodingMultipartWriter) WriteInlineFile(name, mimeType, description string) (io.Writer, error)

WriteInlineFile writes a multipart header for an inline file and provides a writer for the file contents

func (*EncodingMultipartWriter) WritePGPMIMEVersion

func (w *EncodingMultipartWriter) WritePGPMIMEVersion() error

WritePGPMIMEVersion writes a multipart containing PGP Version information

func (*EncodingMultipartWriter) WritePlainText

func (w *EncodingMultipartWriter) WritePlainText(text string) (err error)

WritePlainText writes the given text as a text/plain segment

type GpgUtility

type GpgUtility interface {
	CheckMessageSignature(message io.Reader, signature io.Reader, checkedSignerKey gpg.Key)