Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisableLog ¶
func DisableLog()
DisableLog disables all library log output. Logging output is disabled by default until either UseLogger or SetLogWriter are called.
Types ¶
type Mailer ¶
type Mailer interface { // IsEnabled determines if the smtp server is enabled or not. IsEnabled() bool // SendTo sends an email to a list of recipient email addresses. // This function does not rate limit emails and a recipient does // does not need to correspond to a politeiawww user. This function // can be used to send emails to sysadmins or similar cases. SendTo(subject, body string, recipients []string) error // SendToUsers sends an email to a list of recipient email // addresses. The recipient MUST correspond to a politeiawww user // in the database for the email to be sent. This function rate // limits the number of emails that can be sent to any individual // user over a 24 hour period. If a recipient is provided that does // not correspond to a politeiawww user, the email is simply // skipped. An error is not returned. SendToUsers(subject, body string, recipients map[uuid.UUID]string) error }
Mailer provides an API for interacting with the smtp server.
Click to show internal directories.
Click to hide internal directories.