mailer

package
v0.9.13 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2016 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AUTH_ACTIVATE        base.TplName = "mail/auth/activate"
	AUTH_ACTIVATE_EMAIL  base.TplName = "mail/auth/activate_email"
	AUTH_REGISTER_NOTIFY base.TplName = "mail/auth/register_notify"
	AUTH_RESET_PASSWORD  base.TplName = "mail/auth/reset_passwd"

	NOTIFY_COLLABORATOR base.TplName = "mail/notify/collaborator"
	NOTIFY_MENTION      base.TplName = "mail/notify/mention"
)

Variables

This section is empty.

Functions

func ComposeTplData added in v0.6.15

func ComposeTplData(u *models.User) map[interface{}]interface{}

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 *models.User)

func SendActivateEmailMail added in v0.6.15

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

SendActivateAccountMail sends confirmation e-mail.

func SendAsync

func SendAsync(msg *Message)

func SendCollaboratorMail added in v0.4.0

func SendCollaboratorMail(r macaron.Render, u, doer *models.User, repo *models.Repository) error

SendCollaboratorMail sends mail notification to new collaborator.

func SendIssueMentionMail added in v0.3.0

func SendIssueMentionMail(r macaron.Render, u, owner *models.User,
	repo *models.Repository, issue *models.Issue, tos []string) error

SendIssueMentionMail sends mail notification for who are mentioned in issue.

func SendIssueNotifyMail added in v0.3.0

func SendIssueNotifyMail(u, owner *models.User, repo *models.Repository, issue *models.Issue) ([]string, error)

SendIssueNotifyMail sends mail notification of all watchers of repository.

func SendRegisterNotifyMail added in v0.6.15

func SendRegisterNotifyMail(c *macaron.Context, u *models.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 *models.User)

SendResetPasswordMail sends reset password e-mail.

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 *models.User, tpl base.TplName, code, subject, info string)

Types

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, body string) *Message

NewMessageFrom creates new mail message object with custom From header.

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

Jump to

Keyboard shortcuts

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