PHPackages                             vielhuber/ewshelper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. vielhuber/ewshelper

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

vielhuber/ewshelper
===================

Manage exchange contacts with a breeze.

1.1.9(1mo ago)122MITPHPPHP &gt;=8.1

Since Jan 28Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/vielhuber/ewshelper)[ Packagist](https://packagist.org/packages/vielhuber/ewshelper)[ RSS](/packages/vielhuber-ewshelper/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (7)Versions (21)Used By (0)

[![GitHub Tag](https://camo.githubusercontent.com/bb8be50d429cb8a166ba433dfaf6b531348962d946dfcb5402b656572c79a091/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f7669656c68756265722f65777368656c706572)](https://github.com/vielhuber/ewshelper/tags)[![Code Style](https://camo.githubusercontent.com/1540f8ce219727155ab62506c77b818b720421c22c4cf0b18a5f160942132e2d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f64655f7374796c652d7073722d2d31322d6666363962342e737667)](https://www.php-fig.org/psr/psr-12/)[![License](https://camo.githubusercontent.com/23d4f628a33c83c628d371e693843fd67c61bd358fcc5f3e60a3617b1a3b8754/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7669656c68756265722f65777368656c706572)](https://github.com/vielhuber/ewshelper/blob/main/LICENSE.md)[![Last Commit](https://camo.githubusercontent.com/1c4a5f8fac41b2ad9cf899e489d091e88c889a7122300dcf82473e7ec7ba103c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f7669656c68756265722f65777368656c706572)](https://github.com/vielhuber/ewshelper/commits)[![PHP Version Support](https://camo.githubusercontent.com/28f41c11efbf4d11d0afb605ffcd60c680bdc0ccfd56749f02c7c50adb46549a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7669656c68756265722f65777368656c706572)](https://packagist.org/packages/vielhuber/ewshelper)[![Packagist Downloads](https://camo.githubusercontent.com/498b73b9696ef77704bcc07fd7fa200e357bf8a90d0ada3935abbf3841959678/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7669656c68756265722f65777368656c706572)](https://packagist.org/packages/vielhuber/ewshelper)

📇 ewshelper 📇
=============

[](#-ewshelper-)

ewshelper is a little wrapper around a patched version of [php-ews](https://github.com/jamesiarmes/php-ews) and helps you manage your exchange contacts via php.
it can handle very big lists also helps you normalize your contacts data.

installation
------------

[](#installation)

install once with [composer](https://getcomposer.org/):

```
composer require vielhuber/ewshelper

```

then add this to your files:

```
require __DIR__ . '/vendor/autoload.php';
use vielhuber\ewshelper\ewshelper;
$ewshelper = new ewshelper('**host**', '**username**', '**password**');
```

usage
-----

[](#usage)

#### get all contacts

[](#get-all-contacts)

```
$ewshelper->getContacts();
```

#### get contact by id

[](#get-contact-by-id)

```
$ewshelper->getContact('**id**');
```

#### normalize name and phones

[](#normalize-name-and-phones)

```
$ewshelper->normalizeData();
```

#### remove duplicates

[](#remove-duplicates)

```
$ewshelper->removeDuplicates();
```

#### add a new contact

[](#add-a-new-contact)

```
$ewshelper->addContact([
    'first_name' => 'Max',
    'last_name' => 'Mustermann',
    'company_name' => 'Musterfirma',
    'emails' => ['max@mustermann.de'],
    'phones' => ['private' => ['0123456789'], 'business' => ['9876543210']],
    'url' => 'https://www.mustermann.de',
    'categories' => ['test']
]);
```

#### update a contact

[](#update-a-contact)

```
$ewshelper->updateContact('**id**', [
    'first_name' => 'Max',
    'last_name' => 'Mustermann',
    'company_name' => 'Musterfirma',
    'emails' => ['max@mustermann.de'],
    'phones' => ['private' => ['0123456789'], 'business' => ['9876543210']],
    'url' => 'https://www.mustermann.de',
    'categories' => ['test']
]);
```

#### remove a contact

[](#remove-a-contact)

```
$ewshelper->removeContact('**id**');
```

#### sync contacts

[](#sync-contacts)

the following helper function gets all exchange contacts in category `test`,
deletes those that are not present in the provided array and creates those that don't exist yet in exchange.

```
$ewshelper->syncContacts('test', [
    [
        'first_name' => 'Max',
        'last_name' => 'Mustermann',
        'company_name' => 'Musterfirma',
        'emails' => ['max@mustermann.de'],
        'phones' => ['private' => ['0123456789'], 'business' => ['9876543210']],
        'url' => 'https://www.mustermann.de',
        'categories' => ['test']
    ],
    [
        'first_name' => 'Erika',
        'last_name' => 'Mustermann',
        'company_name' => 'Musterfirma',
        'emails' => ['erika@mustermann.de'],
        'phones' => ['private' => ['0123456789'], 'business' => ['9876543210']],
        'url' => 'https://www.mustermann.de',
        'categories' => ['test']
    ]
]);
```

note on outlook
---------------

[](#note-on-outlook)

when deleting phone numbers or making a lot of changes to existing contacts,
it is recommended to use the function [clear offline items](https://www.extendoffice.com/documents/outlook/1749-outlook-clear-offline-items-undo.html).

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance91

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~121 days

Recently: every ~39 days

Total

20

Last Release

42d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.6

1.1.7PHP &gt;=8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3183737?v=4)[David Vielhuber](/maintainers/vielhuber)[@vielhuber](https://github.com/vielhuber)

---

Top Contributors

[![vielhuber](https://avatars.githubusercontent.com/u/3183737?v=4)](https://github.com/vielhuber "vielhuber (21 commits)")

### Embed Badge

![Health badge](/badges/vielhuber-ewshelper/health.svg)

```
[![Health](https://phpackages.com/badges/vielhuber-ewshelper/health.svg)](https://phpackages.com/packages/vielhuber-ewshelper)
```

###  Alternatives

[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[ec-europa/toolkit

Toolkit packaged for Drupal projects based on Robo.

40252.8k34](/packages/ec-europa-toolkit)[farmos/farmos

A web-based farm record keeping application.

1.3k7.1k1](/packages/farmos-farmos)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
