digest

package
v0.0.0-...-548858b Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package digest summarizes emails

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Body

func Body(body, contentType, transferEncoding string, opt Options) (string, error)

Body takes a raw SMTP body and simplifies it.

The body itself should be the raw body string or optionally a base64 encoded version of it.

Content types can be text/plain or a RFC1341 style multipart. The first text part is used for multipart messages.

Options can be used to further control behavior

func Message

func Message(rawMessage string, opt Options) (string, error)

Message takes a raw smtp message string and returns a simplified version of it.

It only includes From and Subject among the headers and understands transfer encodings like quoted-printable

Options can be used to further control behavior

Types

type Options

type Options struct {
	LineLimit           int
	ColLimit            int
	SkipHTML            bool
	PrettyTables        bool
	OmitLinks           bool
	AllowNonLetterLines bool
}

Options to configure behavior

Jump to

Keyboard shortcuts

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