Skip to content

Commit 21c5635

Browse files
authored
Initial commit
0 parents  commit 21c5635

20 files changed

+669
-0
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.{yml,yaml}]
15+
indent_size = 2

.gitattributes

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Path-based git attributes
2+
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
3+
4+
# Ignore all test and documentation with "export-ignore".
5+
/.github export-ignore
6+
/.gitattributes export-ignore
7+
/.gitignore export-ignore
8+
/phpunit.xml.dist export-ignore
9+
/art export-ignore
10+
/docs export-ignore
11+
/tests export-ignore
12+
/workbench export-ignore
13+
/.editorconfig export-ignore
14+
/.php_cs.dist.php export-ignore
15+
/psalm.xml export-ignore
16+
/psalm.xml.dist export-ignore
17+
/testbench.yaml export-ignore
18+
/UPGRADING.md export-ignore
19+
/phpstan.neon.dist export-ignore
20+
/phpstan-baseline.neon export-ignore

.github/workflows/fix-style.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
on:
2+
push:
3+
paths:
4+
- '**.php'
5+
6+
permissions:
7+
contents: write
8+
9+
jobs:
10+
php-code-styling:
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 5
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
with:
18+
ref: ${{ github.head_ref }}
19+
20+
- name: Fix PHP code style issues
21+
uses: aglipanci/[email protected]
22+
23+
- name: Commit changes
24+
uses: stefanzweifel/git-auto-commit-action@v5
25+
with:
26+
commit_message: Fix styling

.github/workflows/run-tests.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: run-tests
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
test:
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
fail-fast: true
11+
matrix:
12+
os: [ubuntu-latest, windows-latest]
13+
php: [8.4, 8.3 , 8.2]
14+
laravel: [12.*, 11.*, 10.*]
15+
stability: [prefer-lowest, prefer-stable]
16+
include:
17+
- laravel: 12.*
18+
testbench: 10.*
19+
- laravel: 11.*
20+
testbench: 9.*
21+
- laravel: 10.*
22+
testbench: 8.*
23+
24+
25+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
26+
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v4
30+
31+
- name: Setup PHP
32+
uses: shivammathur/setup-php@v2
33+
with:
34+
php-version: ${{ matrix.php }}
35+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
36+
coverage: none
37+
38+
- name: Install dependencies
39+
run: |
40+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
41+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
42+
43+
- name: Execute tests
44+
run: vendor/bin/pest --ci

.gitignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Composer Related
2+
composer.lock
3+
/vendor
4+
5+
# Frontend Assets
6+
/node_modules
7+
8+
# Logs
9+
npm-debug.log
10+
yarn-error.log
11+
12+
# Caches
13+
.phpunit.cache
14+
.phpunit.result.cache
15+
/build
16+
17+
# IDE Helper
18+
_ide_helper.php
19+
_ide_helper_models.php
20+
.phpstorm.meta.php
21+
22+
# Editors
23+
/.idea
24+
/.fleet
25+
/.vscode
26+
27+
# Misc
28+
phpunit.xml
29+
phpstan.neon
30+
testbench.yaml
31+
/docs
32+
/coverage

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Changelog
2+
3+
All notable changes to `ImapEngine-Laravel` will be documented in this file.

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) Steve Bauman <[email protected]>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<p align="center">
2+
<img src="https://github.com/directorytree/imapengine/blob/master/art/logo.svg" width="300">
3+
</p>
4+
5+
<p align="center">Working with IMAP doesn't need to be hard.</p>
6+
7+
<p align="center">ImapEngine provides a simple API for managing mailboxes -- without the PHP extension.</p>
8+
9+
<p align="center">
10+
<a href="https://github.com/directorytree/imapengine/actions"><img src="https://img.shields.io/github/actions/workflow/status/directorytree/imapengine/run-tests.yml?branch=master&style=flat-square"></a>
11+
<a href="https://packagist.org/packages/DirectoryTree/ImapEngine"><img src="https://img.shields.io/packagist/dt/DirectoryTree/ImapEngine.svg?style=flat-square"></a>
12+
<a href="https://packagist.org/packages/DirectoryTree/ImapEngine"><img src="https://img.shields.io/packagist/v/DirectoryTree/ImapEngine.svg?style=flat-square"></a>
13+
<a href="https://packagist.org/packages/DirectoryTree/ImapEngine"><img src="https://img.shields.io/github/license/DirectoryTree/ImapEngine?style=flat-square"/></a>
14+
</p>
15+
16+
<p align="center">
17+
<a href="https://imapengine.com">View Documentation</a>
18+
</p>

composer.json

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"name": "directorytree/imapengine-laravel",
3+
"description": "This is my package imapengine-laravel",
4+
"keywords": [
5+
"Steve Bauman",
6+
"laravel",
7+
"imap"
8+
],
9+
"homepage": "https://github.com/directorytree/imapengine-laravel",
10+
"license": "MIT",
11+
"authors": [
12+
{
13+
"name": "Steve Bauman",
14+
"email": "[email protected]",
15+
"role": "Developer"
16+
}
17+
],
18+
"require": {
19+
"php": "^8.1",
20+
"directorytree/imapengine": "^1.11",
21+
"illuminate/contracts": "^10.0||^11.0||^12.0"
22+
},
23+
"require-dev": {
24+
"laravel/pint": "^1.14",
25+
"nunomaduro/collision": "^8.1.1||^7.10.0",
26+
"orchestra/testbench": "^10.0.0||^9.0.0||^8.22.0",
27+
"pestphp/pest": "^3.0",
28+
"pestphp/pest-plugin-arch": "^3.0",
29+
"pestphp/pest-plugin-laravel": "^3.0",
30+
"spatie/laravel-ray": "^1.35"
31+
},
32+
"autoload": {
33+
"psr-4": {
34+
"DirectoryTree\\ImapEngine\\Laravel\\": "src/"
35+
}
36+
},
37+
"autoload-dev": {
38+
"psr-4": {
39+
"DirectoryTree\\ImapEngine\\Laravel\\Tests\\": "tests/"
40+
}
41+
},
42+
"scripts": {
43+
"post-autoload-dump": "@composer run prepare",
44+
"prepare": "@php vendor/bin/testbench package:discover --ansi",
45+
"analyse": "vendor/bin/phpstan analyse",
46+
"test": "vendor/bin/pest",
47+
"test-coverage": "vendor/bin/pest --coverage",
48+
"format": "vendor/bin/pint"
49+
},
50+
"config": {
51+
"sort-packages": true,
52+
"allow-plugins": {
53+
"pestphp/pest-plugin": true,
54+
"phpstan/extension-installer": true
55+
}
56+
},
57+
"extra": {
58+
"laravel": {
59+
"providers": [
60+
"DirectoryTree\\ImapEngine\\Laravel\\ImapServiceProvider"
61+
]
62+
}
63+
},
64+
"minimum-stability": "dev",
65+
"prefer-stable": true
66+
}

config/imap.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Mailboxes
8+
|--------------------------------------------------------------------------
9+
|
10+
| Here you may define all of the IMAP mailboxes your application connects to.
11+
| Each mailbox contains its connection settings such as host, port, and
12+
| credentials. You are free to add as many mailboxes as needed.
13+
|
14+
*/
15+
16+
'mailboxes' => [
17+
'default' => [
18+
'port' => env('IMAP_PORT', 993),
19+
'host' => env('IMAP_HOST'),
20+
'timeout' => env('IMAP_TIMEOUT', 30),
21+
'debug' => env('IMAP_DEBUG', false),
22+
'username' => env('IMAP_USERNAME'),
23+
'password' => env('IMAP_PASSWORD'),
24+
'encryption' => env('IMAP_ENCRYPTION', 'ssl'),
25+
'validate_cert' => env('IMAP_VALIDATE_CERT', true),
26+
'authentication' => env('IMAP_AUTHENTICATION', 'plain'),
27+
'proxy' => [
28+
'socket' => env('IMAP_PROXY_SOCKET'),
29+
'username' => env('IMAP_PROXY_USERNAME'),
30+
'password' => env('IMAP_PROXY_PASSWORD'),
31+
'request_fulluri' => env('IMAP_PROXY_REQUEST_FULLURI', false),
32+
],
33+
],
34+
],
35+
];

0 commit comments

Comments
 (0)