mail

package
v0.0.0-...-0ee1bbb Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial

func Dial(addr string) (*smtp.Client, error)

func SendMail

func SendMail(params *SendMailParams) (err error)

SendMail 发送邮件

func SendMailUsingTLS

func SendMailUsingTLS(addr string, auth smtp.Auth, from string,
	to []string, msg []byte) (err error)

Types

type MailClient

type MailClient struct {
}

MailClient 邮箱

func Instance

func Instance() *MailClient

Instance 单例

func (*MailClient) GetSmtpEmail

func (c *MailClient) GetSmtpEmail() (string, error)

GetSmtpEmail 获取 GetSmtpEmail

func (*MailClient) GetSmtpEmailPassword

func (c *MailClient) GetSmtpEmailPassword() (string, error)

GetSmtpEmailPassword 获取 GetSmtpEmailPassword

func (*MailClient) GetSmtpHost

func (c *MailClient) GetSmtpHost() (string, error)

GetSmtpHost 获取 GetSmtpHost

func (*MailClient) GetSmtpPort

func (c *MailClient) GetSmtpPort() (int, error)

GetSmtpPort 获取 GetSmtpPort

type SendMailParams

type SendMailParams struct {
	ReceiverEmails []string
	MsgSubject     string
	MsgContentType string
	MsgBody        string
}

Jump to

Keyboard shortcuts

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