Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAlreadyRunning ¶
IsAlreadyRunning checks if the error cause is an alreadyRunning error returned if someone tries to start multiple daemons
func IsNotRunning ¶
IsNotRunning checks if the error cause is a notRunning error returned if someone tries to send a message but mailer daemon is not running
Types ¶
type Config ¶
type Config struct { Server string Port int User string Password string From string To string Subject string }
Config struct encapsulate all settings for TextMailer
type TextMailer ¶
type TextMailer struct {
// contains filtered or unexported fields
}
TextMailer implements Mailer interface it runs a daemon waiting for text messages to send to a predefined address
func (*TextMailer) Run ¶
func (mailer *TextMailer) Run(stop <-chan struct{}) error
Run starts the mailer daemon
func (*TextMailer) SendMessage ¶
func (mailer *TextMailer) SendMessage(contentType, messageText string) error
SendMessage prepares new messages and sends them Caller is responsible for proper escaping of message in case of e.g. HTML
Click to show internal directories.
Click to hide internal directories.