Documentation ¶
Index ¶
- Variables
- func InitMailRender(tmpls *template.Template)
- func LoginAuth(username, password string) smtp.Auth
- func MailParticipants(issue *models.Issue, doer *models.User, opType models.ActionType) error
- func MailParticipantsComment(c *models.Comment, opType models.ActionType, issue *models.Issue) error
- func NewContext()
- func SendActivateAccountMail(locale Locale, u *models.User)
- func SendActivateEmailMail(locale Locale, u *models.User, email *models.EmailAddress)
- func SendAsync(msg *Message)
- func SendCollaboratorMail(u, doer *models.User, repo *models.Repository)
- func SendIssueCommentMail(issue *models.Issue, doer *models.User, content string, ...)
- func SendIssueMentionMail(issue *models.Issue, doer *models.User, content string, ...)
- func SendRegisterNotifyMail(locale Locale, u *models.User)
- func SendResetPasswordMail(locale Locale, u *models.User)
- func SendTestMail(email string) error
- func SendUserMail(language string, u *models.User, tpl base.TplName, code, subject, info string)
- type Locale
- type Message
Constants ¶
This section is empty.
Variables ¶
var Sender gomail.Sender
Sender sender for sending mail synchronously
Functions ¶
func InitMailRender ¶
InitMailRender initializes the mail renderer
func MailParticipants ¶
MailParticipants sends new issue thread created emails to repository watchers and mentioned people.
func MailParticipantsComment ¶
func MailParticipantsComment(c *models.Comment, opType models.ActionType, issue *models.Issue) error
MailParticipantsComment sends new comment emails to repository watchers and mentioned people.
func SendActivateAccountMail ¶
SendActivateAccountMail sends an activation mail to the user (new user registration)
func SendActivateEmailMail ¶
func SendActivateEmailMail(locale Locale, u *models.User, email *models.EmailAddress)
SendActivateEmailMail sends confirmation email to confirm new email address
func SendCollaboratorMail ¶
func SendCollaboratorMail(u, doer *models.User, repo *models.Repository)
SendCollaboratorMail sends mail notification to new collaborator.
func SendIssueCommentMail ¶
func SendIssueCommentMail(issue *models.Issue, doer *models.User, content string, comment *models.Comment, tos []string)
SendIssueCommentMail composes and sends issue comment emails to target receivers.
func SendIssueMentionMail ¶
func SendIssueMentionMail(issue *models.Issue, doer *models.User, content string, comment *models.Comment, tos []string)
SendIssueMentionMail composes and sends issue mention emails to target receivers.
func SendRegisterNotifyMail ¶
SendRegisterNotifyMail triggers a notify e-mail by admin created a account.
func SendResetPasswordMail ¶
SendResetPasswordMail sends a password reset mail to the user
Types ¶
type Message ¶
type Message struct { Info string // Message information for log purpose. *gomail.Message }
Message mail body and log info
func NewMessage ¶
NewMessage creates new mail message object with default From header.
func NewMessageFrom ¶
NewMessageFrom creates new mail message object with custom From header.