mailer

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2014 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AUTH_ACTIVE           base.TplName = "mail/auth/active"
	AUTH_REGISTER_SUCCESS base.TplName = "mail/auth/register_success"
	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 CreateUserActiveCode

func CreateUserActiveCode(u *models.User, startInf interface{}) string

create a time limit code for user active

func GetMailTmplData

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

func NewMailerContext

func NewMailerContext()

func Send

func Send(msg *Message) (int, error)

Direct Send mail message

func SendActiveMail

func SendActiveMail(r macaron.Render, u *models.User)

Send email verify active email.

func SendAsync

func SendAsync(msg *Message)

Async Send mail message

func SendCollaboratorMail added in v0.4.0

func SendCollaboratorMail(r macaron.Render, u, owner *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 SendRegisterMail

func SendRegisterMail(r macaron.Render, u *models.User)

Send user register mail with active code

func SendResetPasswdMail added in v0.3.0

func SendResetPasswdMail(r macaron.Render, u *models.User)

Send reset password email.

Types

type Message

type Message struct {
	To      []string
	From    string
	Subject string
	Body    string
	User    string
	Type    string
	Massive bool
	Info    string
}

func NewHtmlMessage

func NewHtmlMessage(To []string, From, Subject, Body string) Message

Create html mail message

func NewMailMessage

func NewMailMessage(To []string, subject, body string) Message

Create New mail message use MailFrom and MailUser

func NewMailMessageFrom

func NewMailMessageFrom(To []string, from, subject, body string) Message

Create New mail message use MailFrom and MailUser

func (Message) Content

func (m Message) Content() string

create mail content

Jump to

Keyboard shortcuts

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