smtp

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendContentMsg

func SendContentMsg(smtp *db.SMTP, mails []*db.Mail, subject, bodyString string) error

func SendContentMsgByRecipients added in v0.1.10

func SendContentMsgByRecipients(smtp *db.SMTP, recipients []string, subject, bodyString string) error

func SendFilesMsg

func SendFilesMsg(smtp *db.SMTP, mails []*db.Mail, files []*File, subject, bodyString string) error

func SendMail

func SendMail(sendMsg *SendMsg, invalidMails ...string) error

func SendTestMsg

func SendTestMsg(st *db.SMTP) error

Types

type File

type File struct {
	File     *os.File `json:"-"`
	Name     string   `json:"name"`
	FilePath string   `json:"filePath"`
}

type Mail

type Mail struct {
	Name string
	Mail string
}

type SMTP

type SMTP struct {
	Username string
	Mail     string
	Password string
	Host     string
	Port     int
}

type SendMsg

type SendMsg struct {
	Subject       string
	BodyString    string
	ReceiveEmails []*Mail
	SendMail      *SMTP
	// contains filtered or unexported fields
}

type UserNotFoundError

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

func ToUserNotFoundError

func ToUserNotFoundError(mails []string) *UserNotFoundError

func (*UserNotFoundError) Error

func (e *UserNotFoundError) Error() string

Jump to

Keyboard shortcuts

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