{"modulePath":"github.com/stackdocker/gogs","version":"v0.9.13","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package mailer\n\n## Constants\n\n```go\nconst (\n\tAUTH_ACTIVATE        base.TplName = \"mail/auth/activate\"\n\tAUTH_ACTIVATE_EMAIL  base.TplName = \"mail/auth/activate_email\"\n\tAUTH_REGISTER_NOTIFY base.TplName = \"mail/auth/register_notify\"\n\tAUTH_RESET_PASSWORD  base.TplName = \"mail/auth/reset_passwd\"\n\n\tNOTIFY_COLLABORATOR base.TplName = \"mail/notify/collaborator\"\n\tNOTIFY_MENTION      base.TplName = \"mail/notify/mention\"\n)\n```\n\n## Functions\n\n```go\nfunc ComposeTplData(u *models.User) map[interface{}]interface{}\n```\n\n```go\nfunc LoginAuth(username, password string) smtp.Auth\n```\nSMTP AUTH LOGIN Auth Handler\n\n```go\nfunc NewContext()\n```\n\n```go\nfunc SendActivateAccountMail(c *macaron.Context, u *models.User)\n```\n\n```go\nfunc SendActivateEmailMail(c *macaron.Context, u *models.User, email *models.EmailAddress)\n```\nSendActivateAccountMail sends confirmation e-mail.\n\n```go\nfunc SendAsync(msg *Message)\n```\n\n```go\nfunc SendCollaboratorMail(r macaron.Render, u, doer *models.User, repo *models.Repository) error\n```\nSendCollaboratorMail sends mail notification to new collaborator.\n\n```go\nfunc SendIssueMentionMail(r macaron.Render, u, owner *models.User,\n\trepo *models.Repository, issue *models.Issue, tos []string) error\n```\nSendIssueMentionMail sends mail notification for who are mentioned in issue.\n\n```go\nfunc SendIssueNotifyMail(u, owner *models.User, repo *models.Repository, issue *models.Issue) ([]string, error)\n```\nSendIssueNotifyMail sends mail notification of all watchers of repository.\n\n```go\nfunc SendRegisterNotifyMail(c *macaron.Context, u *models.User)\n```\nSendRegisterNotifyMail triggers a notify e-mail by admin created a account.\n\n```go\nfunc SendResetPasswordMail(c *macaron.Context, u *models.User)\n```\nSendResetPasswordMail sends reset password e-mail.\n\n```go\nfunc SendTestMail(email string) error\n```\n\n```go\nfunc SendUserMail(c *macaron.Context, u *models.User, tpl base.TplName, code, subject, info string)\n```\n\n## Types\n\n```go\ntype Message struct {\n\tInfo string // Message information for log purpose.\n\t*gomail.Message\n}\n```\n\n```go\nfunc NewMessage(to []string, subject, body string) *Message\n```\nNewMessage creates new mail message object with default From header.\n\n```go\nfunc NewMessageFrom(to []string, from, subject, body string) *Message\n```\nNewMessageFrom creates new mail message object with custom From header.\n\n```go\ntype Sender struct {\n}\n```\n\n```go\nfunc (s *Sender) Send(from string, to []string, msg io.WriterTo) error\n```\n\n","path":"github.com/stackdocker/gogs/modules/mailer","name":"mailer","synopsis":"","isRedistributable":true}
