Documentation
¶
Index ¶
- Constants
- type Mailer
- type MailerMail
- func (mail *MailerMail) AddAttachment(filename string, filecontent []byte) *MailerMail
- func (mail *MailerMail) Send(mailer *Mailer, insecure bool) error
- func (mail *MailerMail) SetBody(message string) *MailerMail
- func (mail *MailerMail) SetFrom(from string) *MailerMail
- func (mail *MailerMail) SetSubject(subject string) *MailerMail
- func (mail *MailerMail) SetTo(from string) *MailerMail
- func (mail *MailerMail) SetToSingle(fromString string) *MailerMail
- type MailerMailAttachment
Constants ¶
View Source
const ( // GroupAPI is the group API scope use in this package GroupAPI = "sxlibs.k8s.startx.fr" // GroupName is the group name use in this package GroupName = "mailer" )
View Source
const (
// GroupName is the group name use in this package
GroupNameMail = "mailer.mail"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mailer ¶
type Mailer struct { SmtpHost string SmtpPort string SmtpUsername string SmtpPassword string // contains filtered or unexported fields }
Mailer is a wrapper around api.Config
type MailerMail ¶
type MailerMail struct { From string To string Subject string Body string Attachments []MailerMailAttachment // contains filtered or unexported fields }
Mailer is a wrapper around api.Config
func NewMailerMail ¶
func NewMailerMail(from string, to string, subject string, message string) *MailerMail
Initialize a mailer object ex:
mailer := kc.NewMailer()
func (*MailerMail) AddAttachment ¶
func (mail *MailerMail) AddAttachment(filename string, filecontent []byte) *MailerMail
Set the body of the mail
func (*MailerMail) Send ¶
func (mail *MailerMail) Send(mailer *Mailer, insecure bool) error
Set the body of the mail
func (*MailerMail) SetBody ¶
func (mail *MailerMail) SetBody(message string) *MailerMail
Set the body of the mail
func (*MailerMail) SetFrom ¶
func (mail *MailerMail) SetFrom(from string) *MailerMail
Set the from of the mail
func (*MailerMail) SetSubject ¶
func (mail *MailerMail) SetSubject(subject string) *MailerMail
Set the subject of the mail
func (*MailerMail) SetTo ¶
func (mail *MailerMail) SetTo(from string) *MailerMail
Set the to of the mail
func (*MailerMail) SetToSingle ¶
func (mail *MailerMail) SetToSingle(fromString string) *MailerMail
Set the to of the mail
type MailerMailAttachment ¶
Click to show internal directories.
Click to hide internal directories.