to_message

package
v0.6.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	HeaderTo      = "To"
	HeaderCc      = "Cc"
	HeaderBcc     = "Bcc"
	HeaderFrom    = "From"
	HeaderSubject = "Subject"
)

Variables

This section is empty.

Functions

func Address

func Address(name, email string) string

Types

type Header struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type Message

type Message struct {
	Payload MessagePart `json:"payload"`
}

type MessagePart

type MessagePart struct {
	PartId   string          `json:"partId,omitempty"`
	MimeType string          `json:"mimeType,omitempty"`
	Filename string          `json:"filename,omitempty"`
	Headers  []Header        `json:"headers,omitempty"`
	Body     MessagePartBody `json:"body"`
}

func (MessagePart) WithBcc

func (z MessagePart) WithBcc(addrs ...string) MessagePart

func (MessagePart) WithBodyText

func (z MessagePart) WithBodyText(text string) MessagePart

func (MessagePart) WithCc

func (z MessagePart) WithCc(addrs ...string) MessagePart

func (MessagePart) WithFrom

func (z MessagePart) WithFrom(addr string) MessagePart

func (MessagePart) WithHeader

func (z MessagePart) WithHeader(name, value string) MessagePart

func (MessagePart) WithSubject

func (z MessagePart) WithSubject(s string) MessagePart

func (MessagePart) WithTo

func (z MessagePart) WithTo(addrs ...string) MessagePart

type MessagePartBody

type MessagePartBody struct {
	AttachmentId string `json:"attachmentId,omitempty"`
	Size         int    `json:"size"`
	Data         string `json:"data"`
}

Jump to

Keyboard shortcuts

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