mailer

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2015 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AUTH_ACTIVE           base.TplName = "mail/auth/active"
	AUTH_ACTIVATE_EMAIL   base.TplName = "mail/auth/activate_email"
	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 CreateUserEmailActivateCode added in v0.5.11

func CreateUserEmailActivateCode(u *models.User, e *models.EmailAddress, 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 SendActivateEmail added in v0.5.11

func SendActivateEmail(r macaron.Render, user *models.User, email *models.EmailAddress)

Send email to verify secondary email.

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
	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