Documentation ¶
Index ¶
- type AttachMethod
- type Attachment
- type LoggerInterface
- type Message
- func (mm *Message) AddAttachment(file MessageAttachmentInterface) error
- func (mm *Message) AddAttachments(files ...MessageAttachmentInterface) error
- func (mm Message) GetAttachments() MessageAttachmentListInterface
- func (mm Message) GetBcc() mailing.MailAddressListInterface
- func (mm Message) GetBody() []byte
- func (mm Message) GetCc() mailing.MailAddressListInterface
- func (mm Message) GetFrom() mailing.MailAddressInterface
- func (mm Message) GetMimeType() mime.Type
- func (mm Message) GetReplyTo() mailing.MailAddressInterface
- func (mm Message) GetSubject() string
- func (mm Message) GetTo() mailing.MailAddressListInterface
- func (mm *Message) SetBcc(addr mailing.MailAddressInterface) error
- func (mm *Message) SetBccs(addrs mailing.MailAddressListInterface)
- func (mm *Message) SetCc(addr mailing.MailAddressInterface) error
- func (mm *Message) SetCcs(addrs mailing.MailAddressListInterface)
- func (mm *Message) SetFrom(addr mailing.MailAddressInterface) error
- func (mm *Message) SetHTML(msg []byte) error
- func (mm *Message) SetMimeType(typ mime.Type)
- func (mm *Message) SetPlainText(msg []byte) error
- func (mm *Message) SetReplyTo(addr mailing.MailAddressInterface) error
- func (mm *Message) SetSubject(sbj string) error
- func (mm *Message) SetTo(addr mailing.MailAddressInterface) error
- func (mm *Message) SetTos(addrs mailing.MailAddressListInterface)
- func (mm Message) String() string
- type MessageAttachmentInterface
- type MessageAttachmentList
- type MessageAttachmentListInterface
- type MessageInterface
- type ProviderInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttachMethod ¶
type AttachMethod string
const ( AttachMethodInline AttachMethod = "inline" AttachMethodFile AttachMethod = "file" )
type Attachment ¶
type Attachment struct { MimeType string AttachMethod AttachMethod Filename string Name string Extension string Content []byte }
func NewAttachmentFromFile ¶
func NewAttachmentFromFile(filePath string) (a Attachment, err error)
func (Attachment) GetAttachMethod ¶
func (a Attachment) GetAttachMethod() AttachMethod
func (Attachment) GetContent ¶
func (a Attachment) GetContent() []byte
func (Attachment) GetFileName ¶
func (a Attachment) GetFileName() string
func (Attachment) GetMimeType ¶
func (a Attachment) GetMimeType() string
func (Attachment) GetName ¶
func (a Attachment) GetName() string
func (Attachment) IsEmpty ¶
func (a Attachment) IsEmpty() bool
type LoggerInterface ¶
type Message ¶
type Message struct { From mailing.MailAddress ReplyTo mailing.MailAddress To mailing.MailAddressList Cc mailing.MailAddressList Bcc mailing.MailAddressList MimeType mime.Type Subject string Content []byte Attachments MessageAttachmentList }
func (*Message) AddAttachment ¶
func (mm *Message) AddAttachment(file MessageAttachmentInterface) error
func (*Message) AddAttachments ¶
func (mm *Message) AddAttachments(files ...MessageAttachmentInterface) error
func (Message) GetAttachments ¶
func (mm Message) GetAttachments() MessageAttachmentListInterface
func (Message) GetBcc ¶
func (mm Message) GetBcc() mailing.MailAddressListInterface
func (Message) GetCc ¶
func (mm Message) GetCc() mailing.MailAddressListInterface
func (Message) GetFrom ¶
func (mm Message) GetFrom() mailing.MailAddressInterface
func (Message) GetMimeType ¶
func (Message) GetReplyTo ¶
func (mm Message) GetReplyTo() mailing.MailAddressInterface
func (Message) GetSubject ¶
func (Message) GetTo ¶
func (mm Message) GetTo() mailing.MailAddressListInterface
func (*Message) SetBccs ¶
func (mm *Message) SetBccs(addrs mailing.MailAddressListInterface)
func (*Message) SetCcs ¶
func (mm *Message) SetCcs(addrs mailing.MailAddressListInterface)
func (*Message) SetMimeType ¶ added in v0.0.2
func (*Message) SetPlainText ¶
func (*Message) SetReplyTo ¶
func (mm *Message) SetReplyTo(addr mailing.MailAddressInterface) error
func (*Message) SetSubject ¶
func (*Message) SetTos ¶
func (mm *Message) SetTos(addrs mailing.MailAddressListInterface)
type MessageAttachmentList ¶
type MessageAttachmentList []Attachment
func (MessageAttachmentList) GetFileNames ¶
func (mal MessageAttachmentList) GetFileNames() []string
func (MessageAttachmentList) GetList ¶
func (mal MessageAttachmentList) GetList() []MessageAttachmentInterface
func (MessageAttachmentList) IsEmpty ¶
func (mal MessageAttachmentList) IsEmpty() bool
type MessageAttachmentListInterface ¶
type MessageAttachmentListInterface interface { GetList() []MessageAttachmentInterface IsEmpty() bool GetFileNames() []string }
type MessageInterface ¶
type MessageInterface interface { SetFrom(addr mailing.MailAddressInterface) error SetTo(addr mailing.MailAddressInterface) error SetTos(addrs mailing.MailAddressListInterface) SetCc(addr mailing.MailAddressInterface) error SetCcs(addrs mailing.MailAddressListInterface) SetBcc(addr mailing.MailAddressInterface) error SetBccs(addrs mailing.MailAddressListInterface) SetReplyTo(addr mailing.MailAddressInterface) error SetSubject(sbj string) error SetMimeType(typ mime.Type) SetHTML(msg []byte) error SetPlainText(msg []byte) error AddAttachment(file MessageAttachmentInterface) error AddAttachments(files ...MessageAttachmentInterface) error GetFrom() mailing.MailAddressInterface GetTo() mailing.MailAddressListInterface GetCc() mailing.MailAddressListInterface GetBcc() mailing.MailAddressListInterface GetReplyTo() mailing.MailAddressInterface GetSubject() string GetMimeType() mime.Type GetBody() []byte GetAttachments() MessageAttachmentListInterface String() string }
type ProviderInterface ¶
type ProviderInterface interface { Name() mailing.MailProviderName Send(ctx context.Context, msg MessageInterface) error }
Click to show internal directories.
Click to hide internal directories.