email

package
v0.0.0-...-80e8cda Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Name  string `json:"name,omitempty"`
	Email string `json:"email,omitempty"`
}

type Attachment

type Attachment struct {
	Name    string `json:"name"`
	B64Data string `json:"content"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(smtpUser, smtpPassword, smtpHost, senderAddress, noReplyAddress, siteName string, isLocal bool) (Client, error)

func (Client) DefaultAdminAddress

func (e Client) DefaultAdminAddress() string

func (Client) DefaultReplyTo

func (e Client) DefaultReplyTo() string

func (Client) DefaultSenderName

func (e Client) DefaultSenderName() string

func (Client) NoReplySenderAddress

func (e Client) NoReplySenderAddress() string

func (Client) SendHTMLEmail

func (e Client) SendHTMLEmail(from, to, replyTo Address, subject, text string) error

func (Client) SupportSenderAddress

func (e Client) SupportSenderAddress() string

type EmailMessage

type EmailMessage struct {
	Sender      Address   `json:"sender"`
	To          []Address `json:"to"`
	Subject     string    `json:"subject"`
	ReplyTo     Address   `json:"replyTo,omitempty"`
	TextContent string    `json:"textContent,omitempty"`
	HtmlContent string    `json:"htmlContent,omitempty"`
}

type EmailMessageWithAttachment

type EmailMessageWithAttachment struct {
	EmailMessage
	Attachment []Attachment `json:"attachment,omitempty"`
}

Jump to

Keyboard shortcuts

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