Skip to content

Commit

Permalink
Fix for laravel 9
Browse files Browse the repository at this point in the history
  • Loading branch information
Tahsin Gökalp Şaan committed May 19, 2022
1 parent 8a0639b commit 1e0c36f
Show file tree
Hide file tree
Showing 10 changed files with 192 additions and 1,842 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ composer.phar

# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
# composer.lock
composer.lock
76 changes: 32 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Laravel Exchange Web Services Driver
====

![Packagist Version](https://img.shields.io/packagist/v/adeboyed/laravel-ews-driver)
![Packagist PHP Version Support](https://img.shields.io/packagist/php-v/adeboyed/laravel-ews-driver)
![Packagist Version](https://img.shields.io/tahsingokalp/v/adeboyed/laravel-ews-driver)
![Packagist PHP Version Support](https://img.shields.io/packagist/php-v/tahsingokalp/laravel-ews-driver)


A Mail Driver with support for Exchange Web Services, using the original Laravel API. This library extends the original Laravel classes, so it uses exactly the same methods.
Expand All @@ -12,7 +12,7 @@ This library uses the [php-ews](https://github.com/jamesiarmes/php-ews/) library
Therefore requires the following dependencies:

* Composer
* PHP 5.4 or greater
* PHP 8.1 or greater
* cURL with NTLM support (7.30.0+ recommended)
* Exchange 2007 or later

Expand All @@ -23,53 +23,46 @@ For more information, visit that [repo](https://github.com/jamesiarmes/php-ews/)
Add the package to your composer.json and run composer update.
```json
"require": {
"adeboyed/laravel-ews-driver": "~1.1"
"tahsingokalp/laravel-ews-driver": "~1.0"
},
```

or install with composer
```
$ composer require adeboyed/laravel-ews-driver
$ composer require tahsingokalp/laravel-ews-driver
```

Add the Exchange service provider in config/app.php:
(Laravel 5.5+ uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.)
```php
'providers' => [
Adeboyed\LaravelExchangeDriver\ExchangeAddedServiceProvider::class
TahsinGokalp\LaravelEwsDriver\EwsServiceProvider::class
];
```

# Install (Lumen)
Add mail config to config file.

Add the package to your composer.json and run composer update.
```json
"require": {
"adeboyed/laravel-ews-driver": "~1.1"
},
```

or install with composer
```bash
$ composer require adeboyed/laravel-ews-driver
```

Add the exchange service provider in bootstrap/app.php
```php
$app->configure('mail');
$app->configure('services');
$app->register(Adeboyed\LaravelExchangeDriver\ExchangeServiceProvider::class);

unset($app->availableBindings['mailer']);
```

Create mail config files.
config/mail.php
```php
<?php
return [
'driver' => env('MAIL_DRIVER', 'exchange'),
];
'mailers' => [
.
.
.
'exchange' => [
'transport' => 'exchange',
'host' => env('MAIL_HOST'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'version' => env('MAIL_VERSION'),
'messageDispositionType' => env('MAIL_MESSAGE_DISPOSITION_TYPE'),
],
.
.
.
],

```

## Configure
Expand All @@ -80,20 +73,15 @@ MAIL_DRIVER=exchange
MAIL_HOST=webmail.example.com
MAIL_USERNAME=examplemail
MAIL_PASSWORD=examplepassword
MAIL_VERSION=Exchange2010
MAIL_MESSAGE_DISPOSITION_TYPE=SaveOnly|SendAndSaveCopy|SendOnly
```

config/mail.php (In using lumen, this requires creating config directory and file, [see more here](https://lumen.laravel.com/docs/5.7/mail))
```php
'mailers' => [
'exchange' => [
'transport' => 'exchange',
'host' => env('MAIL_HOST'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'messageDispositionType' => env('MAIL_MESSAGE_DISPOSITION_TYPE') // Optional, default: SendAndSaveCopy
],
],
```
For more information on the Message Disposition Type, [view more here](https://github.com/jamesiarmes/php-ews/blob/master/src/Enumeration/MessageDispositionType.php)

## Acknowledgments

For more information on the Message Disposition Type, [view more here](https://github.com/jamesiarmes/php-ews/blob/master/src/Enumeration/MessageDispositionType.php)
* [David Adeboye](https://github.com/adeboyed)
* [arvaipeti](https://github.com/arvaipeti)
* [Bryan Tan](https://github.com/bryanthw1020)
* [Jordy Sinke](https://github.com/jordysinke)
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
{
"name": "adeboyed/laravel-ews-driver",
"name": "tahsingokalp/laravel-ews-driver",
"description": "Adds Exchange Web Services Mail Support to Laravel.",
"keywords": ["laravel", "exchange", "ews"],
"homepage": "https://github.com/adeboyed/laravel-ews-driver",
"homepage": "https://github.com/tahsingokalp/laravel-ews-driver",
"license": "Apache-2.0",
"authors": [
{
"name": "David Adeboye",
"email": "david.adeboye@outlook.com"
"name": "Tahsin Gökalp Şaan",
"email": "tahsinsaan@gmail.com"
}
],
"prefer-stable": true,
"require": {
"php": ">=7.1",
"php": ">=8.1",
"php-ews/php-ews": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "6.*"
},
"autoload": {
"psr-4": {
"Adeboyed\\LaravelSendgridDriver\\": "src/"
"TahsinGokalp\\LaravelEwsDriver\\": "src/"
}
},
"support": {
"issues": "https://github.com/adeboyed/laravel-ews-driver/issues"
"issues": "https://github.com/tahsingokalp/laravel-ews-driver/issues"
},
"extra": {
"laravel": {
"providers": [
"Adeboyed\\LaravelExchangeDriver\\ExchangeAddedServiceProvider"
"TahsinGokalp\\LaravelEwsDriver\\EwsServiceProvider"
]
}
}

}
Loading

0 comments on commit 1e0c36f

Please sign in to comment.