Documentation
¶
Index ¶
- Constants
- func CloseConnection()
- func CloseConnection_err() error
- func Connect()
- func Connect_err() error
- func FillSettings()
- func GetContext() *context.Context
- func GetWaitGroup() *sync.WaitGroup
- func SendEmail(email_send_to string, text string, subject string, filePaths []string) error
- func SendMessage(email_send_to string, text string, subject string) error
- func SetContext(ctx *context.Context)
- func SetWaitGroup(wg *sync.WaitGroup)
- func Start()
- func Start_ctx(ctx *context.Context, wg *sync.WaitGroup) error
- func WaitStop()
- type Attachment
- type SettingsINI
Constants ¶
View Source
const PackageName = "email"
PackageName - имя текущего пакета, для логирования
Variables ¶
This section is empty.
Functions ¶
func GetContext ¶
GetContext возвращает указатель на контекст с защитой RLock
func GetWaitGroup ¶
GetWaitGroup - возвращает группу ожидания завершения всех частей программы
func SendMessage ¶
SendMessage - отправка сообщения Email, без вложений
func SetContext ¶
SetContext устанавливает новое значение контекста с защитой Lock
func SetWaitGroup ¶
SetWaitGroup - присваивает внешний WaitGroup
Types ¶
type Attachment ¶
Attachment - структура для вложения (для совместимости)
type SettingsINI ¶
type SettingsINI struct {
EMAIL_SMTP_SERVER string
EMAIL_SMTP_PORT string
EMAIL_LOGIN string
EMAIL_PASSWORD string
EMAIL_SEND_TO_TEST string
EMAIL_SMTP_AUTHENTICATION string // "NTLM", "LOGIN", "PLAIN", "CRAM-MD5"
EMAIL_ENCRYPTION string // "SSL", "TLS", "STARTTLS", "NONE"
}
SettingsINI - структура для хранения всех нужных переменных окружения
var Settings SettingsINI
Settings хранит все нужные переменные окружения
Click to show internal directories.
Click to hide internal directories.