parsing

package
v0.0.0-...-c002953 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2016 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CONTENT_ENCODING = "content-transfer-encoding"
	CONTENT_TYPE     = "content-type"
	REPLY_TO         = "reply-to"
	SUBJECT          = "subject"
	ZIPWHIP_AUTH     = "x-zipwhip-auth"
	FROM             = "from"
)
View Source
const (
	SESSION_FORMAT        = "^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}:[0-9]"
	SUBJECT_VENDOR_FORMAT = `^[a-zA-Z0-9]{1,}::\+1[0-9]{10}@smtp.zipwhip.com`
	EMAIL_FORMAT          = `\+1[0-9]{10}@smtp.zipwhip.com`
	BOUNDARY_FORMAT       = `_`
)

Variables

View Source
var (
	SESSION_MATCHER        *regexp.Regexp
	SUBJECT_VENDOR_MATCHER *regexp.Regexp
	EMAIL_MATCHER          *regexp.Regexp
)
View Source
var DefaultParseTable = map[string]parseFunc{
	REPLY_TO:     replyTo,
	FROM:         from,
	CONTENT_TYPE: contentType,
}

Functions

func Authentication

func Authentication(sendRequest *request.SendRequest) error

Authentication is defined by meeting the following criteria A. Zipwhip-Auth populated VendorKey and From Address set to a valid Email, phoneNumber@smtp.zipwhip.com B. Zipwhip-Auth populated VendorKey and Subject set to a valid Email, phoneNumber@smtp.zipwhip.com C. Zipwhip Auth populated SessionKey D. Subject populated with VendorKey and From Address set to a valid Email, [vendorKey]::phoneNumber@smtp.zipwhip.com E. Subject populated with SessionKey

func Headers

func Headers(sendRequest *request.SendRequest) error

Run through the Headers, apply any necessary formatting.

func Recipients

func Recipients(recipients []string, sendRequest *request.SendRequest) error

func SendingStrategy

func SendingStrategy(sendRequest *request.SendRequest) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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