Documentation ¶
Index ¶
- Constants
- func InitMailRender(dir, appendDir string, funcMap []template.FuncMap)
- func LoginAuth(username, password string) smtp.Auth
- func NewContext()
- func SendActivateAccountMail(c *macaron.Context, u User)
- func SendActivateEmailMail(c *macaron.Context, u User, email string)
- func SendAsync(msg *Message)
- func SendCollaboratorMail(u, doer User, repo Repository)
- func SendIssueCommentMail(issue Issue, repo Repository, doer User, tos []string)
- func SendIssueMentionMail(issue Issue, repo Repository, doer User, tos []string)
- func SendRegisterNotifyMail(c *macaron.Context, u User)
- func SendResetPasswordMail(c *macaron.Context, u User)
- func SendTestMail(email string) error
- func SendUserMail(c *macaron.Context, u User, tpl, code, subject, info string)
- type Issue
- type MailRender
- type Message
- type Repository
- type Sender
- type User
Constants ¶
View Source
const ( MAIL_AUTH_ACTIVATE = "auth/activate" MAIL_AUTH_ACTIVATE_EMAIL = "auth/activate_email" MAIL_AUTH_RESET_PASSWORD = "auth/reset_passwd" MAIL_AUTH_REGISTER_NOTIFY = "auth/register_notify" MAIL_ISSUE_COMMENT = "issue/comment" MAIL_ISSUE_MENTION = "issue/mention" MAIL_NOTIFY_COLLABORATOR = "notify/collaborator" )
Variables ¶
This section is empty.
Functions ¶
func InitMailRender ¶
func NewContext ¶
func NewContext()
func SendActivateAccountMail ¶
func SendActivateAccountMail(c *macaron.Context, u User)
func SendActivateEmailMail ¶
SendActivateAccountMail sends confirmation email.
func SendCollaboratorMail ¶
func SendCollaboratorMail(u, doer User, repo Repository)
SendCollaboratorMail sends mail notification to new collaborator.
func SendIssueCommentMail ¶
func SendIssueCommentMail(issue Issue, repo Repository, doer User, tos []string)
SendIssueCommentMail composes and sends issue comment emails to target receivers.
func SendIssueMentionMail ¶
func SendIssueMentionMail(issue Issue, repo Repository, doer User, tos []string)
SendIssueMentionMail composes and sends issue mention emails to target receivers.
func SendRegisterNotifyMail ¶
func SendRegisterNotifyMail(c *macaron.Context, u User)
SendRegisterNotifyMail triggers a notify e-mail by admin created a account.
func SendResetPasswordMail ¶
func SendResetPasswordMail(c *macaron.Context, u User)
func SendTestMail ¶
func SendUserMail ¶
Types ¶
type MailRender ¶
type Message ¶
type Message struct { Info string // Message information for log purpose. *gomail.Message }
func NewMessage ¶
NewMessage creates new mail message object with default From header.
func NewMessageFrom ¶
NewMessageFrom creates new mail message object with custom From header.
type Repository ¶
Click to show internal directories.
Click to hide internal directories.