ewsutil

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Utility package to contain functions like sendMail, create Calendar appointment and get user availability

Index

Constants

View Source
const (
	BodyTypeText = "Text"
	BodyTypeHTML = "HTML"
)

Variables

This section is empty.

Functions

func CreateEvent

func CreateEvent(
	c ews.Client, to, optional []string, subject, body, location string, from time.Time, duration time.Duration,
) error

CreateEvent helper method to send Message

func CreateHTMLEvent

func CreateHTMLEvent(
	c ews.Client, to, optional []string, subject, body, location string, from time.Time, duration time.Duration,
) error

func FindPeople

func FindPeople(c ews.Client, q string) ([]ews.Persona, error)

FindPeople find persona slice by query string

func GetPersona

func GetPersona(c ews.Client, personaID string) (*ews.Persona, error)

FindPeople find persona slice by query string

func GetUserPhoto

func GetUserPhoto(c ews.Client, email string) ([]byte, error)

func GetUserPhotoURL

func GetUserPhotoURL(c ews.Client, email string) string

func ListUsersEvents

func ListUsersEvents(
	c ews.Client, eventUsers []EventUser, from time.Time, duration time.Duration,
) (map[EventUser][]Event, error)

func SendEmail

func SendEmail(c ews.Client, to []string, subject, body string) error

SendEmail helper method to send Message

func SendEmailWithAttachment

func SendEmailWithAttachment(c ews.Client, to []string, subject, body string, attachmentPaths []string) error

send email with attachment

func SendEmails added in v0.0.4

func SendEmails(c ews.Client, email Email) error

Types

type Email added in v0.0.4

type Email struct {
	To          []string
	Subject     string
	Body        string
	BodyType    string
	Attachments []string
	Cc          []string
	Bcc         []string
}

type Event

type Event struct {
	Start    time.Time
	End      time.Time
	BusyType ews.BusyType
}

type EventUser

type EventUser struct {
	Email        string
	AttendeeType ews.AttendeeType
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL