Versions in this module Expand all Collapse all v1 v1.5.0 Oct 12, 2026 Changes in this version + var MailScopes = []string + var TeamsScopes = []string + func SetBaseURLForTesting(url string) (restore func()) + type Attachment struct + ContentType string + ID string + Name string + Size int + type Category struct + Color string + DisplayName string + ID string + type Chat struct + ID string + Topic string + type ChatMessage struct + Body *MessageBody + ChatID string + CreatedDateTime string + DeletedDateTime string + From *ChatMessageFrom + ID string + type ChatMessageFrom struct + User *ChatMessageUser + type ChatMessageUser struct + DisplayName string + ID string + type Client struct + func New(httpClient *http.Client) *Client + func (c *Client) Compose(ctx context.Context, opts ComposeOptions) error + func (c *Client) CreateCategory(ctx context.Context, name string) (Category, error) + func (c *Client) CreateDraft(ctx context.Context, opts ComposeOptions) (*Message, error) + func (c *Client) DeleteCategory(ctx context.Context, id string) error + func (c *Client) DeleteDraft(ctx context.Context, draftID string) error + func (c *Client) GetAttachment(ctx context.Context, messageID, attachmentID string) ([]byte, error) + func (c *Client) GetMessage(ctx context.Context, id string) (*Message, error) + func (c *Client) GetProfile(ctx context.Context) (Profile, error) + func (c *Client) LatestMessageInConversation(ctx context.Context, conversationID string) (*Message, error) + func (c *Client) ListAttachments(ctx context.Context, messageID string) ([]Attachment, error) + func (c *Client) ListCategories(ctx context.Context) ([]Category, error) + func (c *Client) ListChatMessages(ctx context.Context, chatID, cursor string) ([]ChatMessage, string, error) + func (c *Client) ListChats(ctx context.Context) ([]Chat, error) + func (c *Client) ListDrafts(ctx context.Context, top int) ([]Message, error) + func (c *Client) ListMessagesDelta(ctx context.Context, cursor string) ([]Message, string, error) + func (c *Client) ListMessagesInConversation(ctx context.Context, conversationID string) ([]Message, error) + func (c *Client) ModifyMessageCategories(ctx context.Context, id string, addCategories, removeCategories []string) error + func (c *Client) MoveMessage(ctx context.Context, id, destinationFolderID string) (string, error) + func (c *Client) ReplyToMessage(ctx context.Context, messageID, body string) error + func (c *Client) SearchMessages(ctx context.Context, query string, maxResults int) ([]Message, error) + func (c *Client) SendChatMessage(ctx context.Context, chatID, body string) error + func (c *Client) SendDraft(ctx context.Context, draftID string) error + func (c *Client) SendMail(ctx context.Context, to []string, subject, body string) error + func (c *Client) SetMessageRead(ctx context.Context, id string, read bool) error + func (c *Client) TrashMessage(ctx context.Context, id string) (string, error) + func (c *Client) UntrashMessage(ctx context.Context, id string) (string, error) + type ComposeOptions struct + Bcc []string + Body string + Cc []string + Subject string + To []string + type EmailAddress struct + Address string + Name string + type GraphError struct + Body string + Status int + func (e *GraphError) Error() string + type Message struct + Body *MessageBody + BodyPreview string + Categories []string + CcRecipients []RecipientEntry + ConversationID string + Deleted *struct{} + From *Recipient + HasAttachments bool + ID string + IsRead bool + ReceivedDateTime string + Subject string + ToRecipients []RecipientEntry + type MessageBody struct + Content string + ContentType string + type Profile struct + DisplayName string + Mail string + UserPrincipalName string + type Recipient struct + EmailAddress EmailAddress + type RecipientEntry struct + EmailAddress EmailAddress