mailtoolkit

package module
v0.0.0-...-09aff3d Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2018 License: MIT Imports: 3 Imported by: 0

README

mailtoolkit

Build Status Coverage CodeReport GoDoc

GO mail toolkit to parse email content to an object

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MIMEContentDispositionTypes = []string{"inline", "attachment"}
View Source
var MIMEContentTypes = []string{"application", "audio", "image", "multipart", "text", "video"}

Functions

func ParseContents

func ParseContents(buffer []byte, contentInfo ContentInfo, contentID *int) (map[string]Content, map[string]Attachment)

Types

type Attachment

type Attachment struct {
	ContentInfo ContentInfo
	Data        []byte
}

type Content

type Content struct {
	ContentInfo ContentInfo
	Data        []byte
}

type ContentDisposition

type ContentDisposition struct {
	Type       string
	Parameters map[string]string
}

type ContentInfo

type ContentInfo struct {
	Type             ContentType
	ID               string
	Description      string
	TransferEncoding string
	Disposition      ContentDisposition
}

type ContentType

type ContentType struct {
	Type       string
	Subtype    string
	Parameters map[string]string
}
type Header struct {
	IsMime      bool
	From        string
	To          string
	Cc          string
	Bcc         string
	Date        string
	Subject     string
	Elements    map[string]string
	ContentInfo ContentInfo
}

func ParseHeader

func ParseHeader(buffer []byte) Header

type Mail

type Mail struct {
	Header      Header
	Contents    map[string]Content
	Attachments map[string]Attachment
}

func Parse

func Parse(buffer []byte) Mail

Source Files

  • content.go
  • contentinfo.go
  • declarations.go
  • header.go
  • mailtoolkit.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL