Documentation
¶
Index ¶
- func BuildAttachment(metadata AttachmentMetadata) ([]byte, error)
- func BuildSendSavedEmail(emailId, changeKey string) ([]byte, error)
- func BuildTextEmail(metadata EmailMetadata) ([]byte, error)
- func Issue(creds Credentials, body []byte) (string, error)
- func IssueAttachment(creds Credentials, metadata AttachmentMetadata) (string, error)
- func IssueEmailWithAttachment(creds Credentials, metadata AttachmentMetadata) (string, error)
- func IssueTextEmail(creds Credentials, metadata EmailMetadata) (string, string, string, error)
- func SendEmail(creds Credentials, metadata EmailMetadata) (string, error)
- func SendEmailWithAttachment(creds Credentials, emailMetadata EmailMetadata, ...) (string, error)
- type Attachment
- type AttachmentMetadata
- type Body
- type CreateAttachmentResponse
- type CreateItem
- type CreateItemResponse
- type Credentials
- type DistinguishedFolderID
- type EmailAttachment
- type EmailMetadata
- type FileAttachment
- type ItemID
- type ItemIDs
- type Mailbox
- type Message
- type Messages
- type OneMailbox
- type SavedItemFolderID
- type SendItem
- type SendItemResponse
- type XMailbox
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildAttachment ¶
func BuildAttachment(metadata AttachmentMetadata) ([]byte, error)
func BuildSendSavedEmail ¶
func BuildTextEmail ¶
func BuildTextEmail(metadata EmailMetadata) ([]byte, error)
func IssueAttachment ¶
func IssueAttachment(creds Credentials, metadata AttachmentMetadata) (string, error)
func IssueEmailWithAttachment ¶
func IssueEmailWithAttachment(creds Credentials, metadata AttachmentMetadata) (string, error)
func IssueTextEmail ¶
func IssueTextEmail(creds Credentials, metadata EmailMetadata) (string, string, string, error)
func SendEmail ¶
func SendEmail(creds Credentials, metadata EmailMetadata) (string, error)
func SendEmailWithAttachment ¶
func SendEmailWithAttachment(creds Credentials, emailMetadata EmailMetadata, attachmentMetadata AttachmentMetadata) (string, error)
Types ¶
type Attachment ¶
type Attachment struct {
FileAttachment FileAttachment `xml:"t:FileAttachment"`
}
type AttachmentMetadata ¶
type CreateAttachmentResponse ¶
type CreateAttachmentResponse struct { XMLName xml.Name `xml:"Envelope"` Body struct { CreateAttachmentResponseMessage struct { ResponseClass string `xml:"ResponseClass,attr"` ResponseCode string `xml:"ResponseCode"` Attachments struct { FileAttachment []struct { AttachmentID struct { ID string `xml:"Id,attr"` RootItemID string `xml:"RootItemId,attr"` RootItemChangeKey string `xml:"RootItemChangeKey,attr"` } `xml:"AttachmentId"` LastModifiedTime string `xml:"LastModifiedTime"` } `xml:"FileAttachment"` } `xml:"Attachments"` } `xml:"CreateAttachmentResponse>ResponseMessages>CreateAttachmentResponseMessage"` } `xml:"Body"` }
type CreateItem ¶
type CreateItem struct { XMLName struct{} `xml:"m:CreateItem"` MessageDisposition string `xml:"MessageDisposition,attr"` SavedItemFolderID SavedItemFolderID `xml:"m:SavedItemFolderId"` Items Messages `xml:"m:Items"` }
func CreateItemXML ¶
func CreateItemXML(metadata EmailMetadata) CreateItem
type CreateItemResponse ¶
type CreateItemResponse struct { XMLName xml.Name `xml:"Envelope"` Body struct { CreateItemResponseMessage struct { ResponseClass string `xml:"ResponseClass,attr"` ResponseCode string `xml:"ResponseCode"` Items struct { Message []struct { ItemID struct { ID string `xml:"Id,attr"` ChangeKey string `xml:"ChangeKey,attr"` } `xml:"ItemId"` } `xml:"Message"` } `xml:"Items"` } `xml:"CreateItemResponse>ResponseMessages>CreateItemResponseMessage"` } `xml:"Body"` }
type Credentials ¶
type DistinguishedFolderID ¶
type DistinguishedFolderID struct {
ID string `xml:"Id,attr"`
}
type EmailAttachment ¶
type EmailMetadata ¶
type FileAttachment ¶
type Message ¶
type Message struct { ItemClass string `xml:"t:ItemClass"` Subject string `xml:"t:Subject"` Body Body `xml:"t:Body"` Attachments []Attachment `xml:"t:Attachments"` // Sender OneMailbox `xml:"t:Sender"` ToRecipients XMailbox `xml:"t:ToRecipients"` CcRecipients XMailbox `xml:"t:CcRecipients"` BccRecipients XMailbox `xml:"t:BccRecipients"` ReplyTo OneMailbox `xml:"t:ReplyTo"` }
type OneMailbox ¶
type OneMailbox struct {
Mailbox Mailbox `xml:"t:Mailbox"`
}
type SavedItemFolderID ¶
type SavedItemFolderID struct {
DistinguishedFolderID DistinguishedFolderID `xml:"t:DistinguishedFolderId"`
}
type SendItemResponse ¶
type SendItemResponse struct { XMLName xml.Name `xml:"Envelope"` Body struct { SendItemResponse struct { ResponseMessages struct { SendItemResponseMessage struct { ResponseClass string `xml:"ResponseClass,attr"` ResponseCode string `xml:"ResponseCode"` } `xml:"SendItemResponseMessage"` } `xml:"ResponseMessages"` } `xml:"SendItemResponse"` } `xml:"Body"` }
Click to show internal directories.
Click to hide internal directories.