Documentation ¶
Index ¶
- func NewMail() Email
- type Mail
- func (e *Mail) AddBcc(email, name string)
- func (e *Mail) AddBody(contentType string, body []byte)
- func (e *Mail) AddCc(email, name string)
- func (e *Mail) AddTo(email, name string)
- func (e *Mail) Attach(contentType string, data []byte) apperror.Error
- func (e *Mail) AttachFile(path string) apperror.Error
- func (e *Mail) AttachReader(contentType string, reader io.ReadCloser) apperror.Error
- func (e *Mail) Embed(contentType string, data []byte) apperror.Error
- func (e *Mail) EmbedFile(path string) apperror.Error
- func (e *Mail) EmbedReader(contentType string, reader io.ReadCloser) apperror.Error
- func (e *Mail) GetAttachments() []EmailPart
- func (e *Mail) GetBcc() []EmailRecipient
- func (e *Mail) GetBodyParts() []EmailPart
- func (e *Mail) GetCc() []EmailRecipient
- func (e *Mail) GetEmbeddedAttachments() []EmailPart
- func (e *Mail) GetFrom() EmailRecipient
- func (e *Mail) GetSubject() string
- func (e *Mail) GetTo() []EmailRecipient
- func (e *Mail) SetBody(contentType string, body []byte)
- func (e *Mail) SetFrom(email, name string)
- func (e *Mail) SetHeader(name string, values ...string)
- func (e *Mail) SetHeaders(data map[string][]string)
- func (e *Mail) SetSubject(subject string)
- type Part
- type Recipient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mail ¶
type Mail struct { From Recipient To []Recipient Cc []Recipient Bcc []Recipient BodyParts []*Part Attachments []*Part EmbeddedAttachments []*Part Headers map[string][]string }
func (*Mail) AttachFile ¶
func (*Mail) AttachReader ¶
func (e *Mail) AttachReader(contentType string, reader io.ReadCloser) apperror.Error
func (*Mail) EmbedReader ¶
func (e *Mail) EmbedReader(contentType string, reader io.ReadCloser) apperror.Error
func (*Mail) GetAttachments ¶
func (e *Mail) GetAttachments() []EmailPart
func (*Mail) GetBodyParts ¶
func (e *Mail) GetBodyParts() []EmailPart
func (*Mail) GetEmbeddedAttachments ¶
func (e *Mail) GetEmbeddedAttachments() []EmailPart
func (*Mail) GetSubject ¶
func (*Mail) SetHeaders ¶
func (*Mail) SetSubject ¶
type Part ¶
type Part struct { MimeType string Content []byte Reader io.ReadCloser FilePath string }
func (Part) GetContent ¶
func (Part) GetFilePath ¶
func (Part) GetMimeType ¶
func (Part) GetReader ¶
func (p Part) GetReader() io.ReadCloser
func (*Part) SetFilePath ¶
Click to show internal directories.
Click to hide internal directories.