mailer

package
v0.9.128 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2017 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MAIL_AUTH_ACTIVATE        base.TplName = "auth/activate"
	MAIL_AUTH_ACTIVATE_EMAIL  base.TplName = "auth/activate_email"
	MAIL_AUTH_RESET_PASSWORD  base.TplName = "auth/reset_passwd"
	MAIL_AUTH_REGISTER_NOTIFY base.TplName = "auth/register_notify"

	MAIL_ISSUE_COMMENT base.TplName = "issue/comment"
	MAIL_ISSUE_MENTION base.TplName = "issue/mention"

	MAIL_NOTIFY_COLLABORATOR base.TplName = "notify/collaborator"
)

Variables

This section is empty.

Functions

func InitMailRender added in v0.9.128

func InitMailRender(dir, appendDir string, funcMap []template.FuncMap)

func LoginAuth added in v0.6.9

func LoginAuth(username, password string) smtp.Auth

SMTP AUTH LOGIN Auth Handler

func NewContext added in v0.6.15

func NewContext()

func SendActivateAccountMail added in v0.6.15

func SendActivateAccountMail(c *macaron.Context, u User)

func SendActivateEmailMail added in v0.6.15

func SendActivateEmailMail(c *macaron.Context, u User, email string)

SendActivateAccountMail sends confirmation email.

func SendAsync

func SendAsync(msg *Message)

func SendCollaboratorMail added in v0.4.0

func SendCollaboratorMail(u, doer User, repo Repository)

SendCollaboratorMail sends mail notification to new collaborator.

func SendIssueCommentMail added in v0.9.128

func SendIssueCommentMail(issue Issue, repo Repository, doer User, tos []string)

SendIssueCommentMail composes and sends issue comment emails to target receivers.

func SendIssueMentionMail added in v0.3.0

func SendIssueMentionMail(issue Issue, repo Repository, doer User, tos []string)

SendIssueMentionMail composes and sends issue mention emails to target receivers.

func SendRegisterNotifyMail added in v0.6.15

func SendRegisterNotifyMail(c *macaron.Context, u User)

SendRegisterNotifyMail triggers a notify e-mail by admin created a account.

func SendResetPasswordMail added in v0.6.15

func SendResetPasswordMail(c *macaron.Context, u User)

func SendTestMail added in v0.9.0

func SendTestMail(email string) error

func SendUserMail added in v0.6.15

func SendUserMail(c *macaron.Context, u User, tpl base.TplName, code, subject, info string)

Types

type Issue added in v0.9.128

type Issue interface {
	MailSubject() string
	Content() string
	HTMLURL() string
}

type MailRender added in v0.9.128

type MailRender interface {
	HTMLString(string, interface{}, ...macaron.HTMLOptions) (string, error)
}

type Message

type Message struct {
	Info string // Message information for log purpose.
	*gomail.Message
}

func NewMessage added in v0.6.15

func NewMessage(to []string, subject, body string) *Message

NewMessage creates new mail message object with default From header.

func NewMessageFrom added in v0.6.15

func NewMessageFrom(to []string, from, subject, htmlBody string) *Message

NewMessageFrom creates new mail message object with custom From header.

type Repository added in v0.9.128

type Repository interface {
	FullName() string
	HTMLURL() string
	ComposeMetas() map[string]string
}

type Sender added in v0.6.15

type Sender struct {
}

func (*Sender) Send added in v0.6.15

func (s *Sender) Send(from string, to []string, msg io.WriterTo) error

type User added in v0.9.128

type User interface {
	ID() int64
	DisplayName() string
	Email() string
	GenerateActivateCode() string
	GenerateEmailActivateCode(string) string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL