smtpc

package
v0.0.0-...-4f40efb Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2015 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

simple smtp client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendMulti

func SendMulti(auth Auth, email MultipartEmail) error

only allows single content

Types

type Attachment

type Attachment struct {
	Filename  string
	ContentID string
	Content
}

type Auth

type Auth struct {
	User     string // for aws ses, the key id
	Password string // for aws ses, the secret key
	Host     string
	Port     int // for aws ses, 587 would work
}

type Content

type Content struct {
	Type string
	Data []byte
}

type Meta

type Meta struct {
	To      []string
	Cc      []string
	From    string
	Subject string
}

type MultipartEmail

type MultipartEmail struct {
	Meta
	Content     []Content // alternative presentations of same content
	Attachments []Attachment
}

func (MultipartEmail) Signature

func (m MultipartEmail) Signature() string

calculates a content signature of email

type PlainTextEmail

type PlainTextEmail struct {
	To      []string
	Cc      []string
	From    string
	Subject string
	Content string
}

func (PlainTextEmail) ToMultipart

func (p PlainTextEmail) ToMultipart() MultipartEmail

Jump to

Keyboard shortcuts

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