PHP code example of somecoding / ews-auth

1. Go to this page and download the library: Download somecoding/ews-auth library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

somecoding / ews-auth example snippets


$username = 'test-account';
$password = 'test-password';
$options = [
    'server' => 'owa.example.com',
    'domain' => 'example', // optional (is added in front of username: example\username)
    'clientVersion' => 'Exchange2013_SP1' //optional
];
$auth = new \EwsAuthAdapter\Ews($options, $username, $password);