Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Php Ews Laravel Package

garethp/php-ews

A PHP library for Microsoft Exchange Web Services (EWS). Manage mail, calendars, contacts, tasks, and folders on Exchange Server and Office 365 through a clean, object-oriented wrapper over the EWS SOAP API, with support for Exchange 2007 through 2019 and Exchange Online.

View on GitHub
Deep Wiki
Context7

PHP Exchange Web Services

Frequently asked questions about Php Ews
Can I use garethp/php-ews in a Laravel application?
Yes. garethp/php-ews is a framework-agnostic PHP library, not a Laravel package, so it installs with Composer and can be bound into Laravel 10 or 11 via a service provider. The recommended pattern is to hide it behind an application-owned gateway interface instead of calling it from controllers or models.
How do I install and configure garethp/php-ews in Laravel?
Run composer require garethp/php-ews and make sure ext-soap and/or ext-curl are available. Add a config/exchange.php file for host, credentials, and Exchange version, then bind a client factory as a singleton in a service provider. Keep credentials out of source control and use environment variables or a secrets manager.
Does garethp/php-ews work with Exchange Online and Office 365?
Yes, where EWS is still available, but Exchange Online has been closed to new EWS applications since 2022 and Microsoft has signposted EWS retirement for Exchange Online. Basic auth is gone and OAuth2 bearer tokens are required, so you need an Entra ID app registration with EWS scopes. On-premises Exchange 2016 and 2019 remain the strongest, best-supported targets.
Which authentication methods does garethp/php-ews support?
The library supports impersonation, delegation, and common Exchange authentication flows. For Exchange Online you must use OAuth2 bearer tokens; Basic auth is no longer an option. On-premises deployments may still use whatever auth model your Exchange estate permits.
Should I use garethp/php-ews or Microsoft Graph for a new integration?
Treat it as a bimodal decision: strong fit for on-premises or legacy Exchange estates, but materially constrained for new Office 365 work. Microsoft Graph should be the default for greenfield Microsoft 365 integrations unless you need a specific EWS-only capability. Designing an EWS adapter behind a protocol-agnostic interface from day one makes a later Graph implementation a drop-in replacement.
How do I handle EWS throttling and ServerBusy errors in Laravel?
EWS enforces per-mailbox concurrency and budget limits, so naive synchronous calls will surface as intermittent ServerBusy or ErrorServerBusy failures. Put every call behind a Laravel RateLimiter or a backoff and retry policy, and push writes or fan-out work into queued jobs. Monitor throttling responses and tune concurrency per tenant.
How should I structure garethp/php-ews in a Laravel codebase?
Keep garethp/php-ews in the infrastructure or integration layer behind ports such as MailGateway and CalendarGateway. Map the library's typed request and response objects to your own value objects at the adapter boundary so EWS types never leak into the domain layer. Add a config file, a singleton service provider binding, queued jobs for writes, and a rate limiter in front of every call.
How can I test a Laravel app that uses garethp/php-ews?
Mock your own gateway interface rather than the EWS client, and keep live mailbox calls out of the unit test suite. The library's typed request and response objects make it easier to build fakes and assert on mapped domain objects. Calendar recurrence, time zones, attachment limits, and folder semantics still deserve targeted integration tests against a disposable test mailbox.
What can I do with garethp/php-ews for mail, calendars, contacts, and tasks?
The library provides a typed, object-oriented API over EWS SOAP calls for sending, reading, searching, and managing email and attachments. You can also create and update calendar events, contacts, tasks, and folders, and use streaming notifications for change subscriptions. Watch Exchange attachment size limits and map the library objects into your own DTOs before handing them to application code.
Is garethp/php-ews actively maintained and what are the risks?
It has roughly 116 GitHub stars and appears to follow a single-maintainer model, which means bus factor of one and no commercial SLA. The recent release date is positive, but the typed class surface must track Microsoft schema changes and you should plan who owns a fork if upstream goes quiet. BSD-3-Clause is permissive and business-friendly, but it is a license, not a warranty.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource