Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment struct { Filename string Data []byte Inline bool // CID (Content-ID) allows referencing in the body of email, eg <img src="cid:[cid]" /> CID string }
Attachment represents a file Data is expected to be in binary and will be base64 standard encoded automatically
type Message ¶
type Message struct { From string To string CC string BCC string Subject string Headers textproto.MIMEHeader Body string Attachments []Attachment }
Message represents an email to be sent commonly used fields From, To, CC, BCC and Subject are provided for convenience and overwrite their corresponding entry in Headers for maximum customization access Headers directly
func NewMessage ¶
func NewMessage() *Message
func (*Message) RawUnencoded ¶
Raw converts message to unencoded rfc2822 format with MIME
func (*Message) ToGmailMessage ¶
func (m *Message) ToGmailMessage() *gmail.Message
ToGmailMessage is a convenience function that returns a ready to send gmail Message with Raw property set and label ids set to 'UNREAD' and 'INBOX'
Click to show internal directories.
Click to hide internal directories.