oemail

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	SMTP_HOST     string
	SMTP_PORT     int
	SMTP_EMAIL    string
	SMTP_PASSWORD string
	SMTP_NAME     string
}

func NewConfig

func NewConfig(SMTP_HOST, SMTP_EMAIL, SMTP_PASSWORD, SMTP_NAME string, SMTP_PORT int) *Config

type EmailRequest

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

Request struct

func NewRequest

func NewRequest(config *Config, to []string, subject, body string) *EmailRequest

func (*EmailRequest) AttachFile

func (m *EmailRequest) AttachFile(src string) error

func (*EmailRequest) ParseTemplate

func (r *EmailRequest) ParseTemplate(templateFileName string, data interface{}) error

func (*EmailRequest) SendEmail

func (r *EmailRequest) SendEmail() (bool, error)

func (*EmailRequest) ToBytes

func (m *EmailRequest) ToBytes() []byte

Jump to

Keyboard shortcuts

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