Giter VIP home page Giter VIP logo

ews's Introduction

EWS Exchange Web Service

Exchange Web Service client for golang

usage:

package main

import (
	"fmt"
	"github.com/mhewedy/ews"
	"github.com/mhewedy/ews/ewsutil"
	"log"
)

func main() {

	c := ews.NewClient(
		"https://outlook.office365.com/EWS/Exchange.asmx",
		"email@exchangedomain",
		"password",
		&ews.Config{Dump: true, NTLM: false},
	)

	err := ewsutil.SendEmail(c,
		[]string{"[email protected]", "[email protected]"},
		"An email subject",
		"The email body, as plain text",
	)

	if err != nil {
		log.Fatal("err>: ", err.Error())
	}

	fmt.Println("--- success ---")
}

Note: if you are using an on-premises Exchange server (or even if you manage your servers at the cloud), you need to pass the username as AD_DOMAINNAME\username instead, for examle MYCOMANY\mhewedy.

Supported Feature matrix:

Category Operation Supported*
eDiscovery operations
Exchange mailbox data operations
CreateItem operation ✔️ (Email & Calendar)
GetUserPhoto ✔️
Availability operations
GetUserAvailability ✔️
GetRoomLists ✔️
Bulk transfer operations
Delegate management operations
Inbox rules operations
Mail app management operations
Mail tips operation
Message tracking operations
Notification operations
Persona operations
FindPeople ✔️
GetPersona ✔️
Retention policy operation
Service configuration operation
Sharing operations
Synchronization operations
Time zone operation
Unified Messaging operations
Unified Contact Store operations
User configuration operations
  • Not always 100% of fields are mapped.

Extras

Besides the operations supported above, few new operations under the namespace ewsutil has been introduced:

  • ewsutil.SendEmail
  • ewsutil.CreateEvent
  • ewsutil.ListUsersEvents
  • ewsutil.FindPeople
  • ewsutil.GetUserPhoto
  • ewsutil.GetUserPhotoBase64
  • ewsutil.GetUserPhotoURL
  • ewsutil.GetPersona

NTLM is supported as well as Basic authentication

Reference:

https://docs.microsoft.com/en-us/exchange/client-developer/web-service-reference/ews-operations-in-exchange

ews's People

Contributors

andlabs avatar mhewedy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.