Send alert mails, configured via environment variables. UNIX only. Requires /usr/sbin/sendmail
.
export [email protected]
export [email protected]
export ALERT_MAIL_TITLE_PREFIX=[PRODUCTION]
import "github.com/setlog/alert"
func main() {
alert.Mail("Import failed!", "Failed to parse line %d", 42) // fmt.Sprintf-style formatting.
}