-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Track bp-rbe-inbound-forum-attachments/vendor
- Loading branch information
1 parent
8010438
commit f9abec9
Showing
183 changed files
with
12,595 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
forked-plugins/bp-rbe-inbound-forum-attachments/vendor/autoload.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
// autoload.php @generated by Composer | ||
|
||
require_once __DIR__ . '/composer/autoload_real.php'; | ||
|
||
return ComposerAutoloaderInit9161dbb779a62d8efa2e2da26bcb9a39::getLoader(); |
8 changes: 8 additions & 0 deletions
8
forked-plugins/bp-rbe-inbound-forum-attachments/vendor/bashkarev/email/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.idea | ||
nbproject | ||
/vendor | ||
/example | ||
/bin | ||
composer.phar | ||
.DS_Store | ||
Thumbs.db |
13 changes: 13 additions & 0 deletions
13
forked-plugins/bp-rbe-inbound-forum-attachments/vendor/bashkarev/email/.travis.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
language: php | ||
|
||
php: | ||
- 5.4 | ||
- 5.5 | ||
- 5.6 | ||
- 7 | ||
- 7.1 | ||
|
||
before_script: | ||
- composer install | ||
|
||
script: phpunit |
21 changes: 21 additions & 0 deletions
21
forked-plugins/bp-rbe-inbound-forum-attachments/vendor/bashkarev/email/LICENSE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2017 Dmitriy Bashkarev | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
121 changes: 121 additions & 0 deletions
121
forked-plugins/bp-rbe-inbound-forum-attachments/vendor/bashkarev/email/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
Faster MIME Mail Parser | ||
======================= | ||
|
||
Faster MIME Mail Parser could be used to parse emails in MIME format. | ||
|
||
[![Build Status](https://travis-ci.org/bashkarev/email.svg?branch=master)](https://travis-ci.org/bashkarev/email) | ||
|
||
# Usage | ||
|
||
Basic usage is the following: | ||
|
||
```php | ||
$file = fopen('path/to/file.eml', 'r'); | ||
$message = \bashkarev\email\Parser::email($file); | ||
|
||
$message->textHtml(); | ||
|
||
$message->getParts(); | ||
$message->getAttachments(); | ||
``` | ||
|
||
## Settings | ||
|
||
There are settings available. | ||
|
||
- `charset` - character set to use. Should be specified in uppercase only. | ||
Default is `UTF-8`. | ||
|
||
```php | ||
\bashkarev\email\Parser::$charset = "WINDOWS-1251"; | ||
``` | ||
|
||
- `buffer` - read buffer size in bytes. Default is `500000`. | ||
|
||
```php | ||
\bashkarev\email\Parser::$buffer = 4096; | ||
``` | ||
|
||
## Attachments | ||
|
||
There is attachments parsing support. | ||
|
||
### Saving attachments to files | ||
|
||
Saving to files could be done as follows: | ||
|
||
```php | ||
$file = fopen('path/to/file.eml', 'rb'); | ||
$message = \bashkarev\email\Parser::email($file); | ||
foreach ($message->getAttachments() as $attachment) { | ||
$attachment->save('dir/' . $attachment->getFileName('undefined')); | ||
} | ||
``` | ||
|
||
### Streaming attachment to output | ||
|
||
In order to stream attachment to output directly you need to do the following: | ||
|
||
```php | ||
$file = fopen('path/to/file.eml', 'rb'); | ||
$message = \bashkarev\email\Parser::email($file); | ||
$attachment = $message->getAttachments()[0]; | ||
header("Content-Type: {$attachment->getMimeType()};"); | ||
header("Content-Disposition: attachment; filename=\"{$attachment->getFileName('undefined')}\""); | ||
$attachment->getStream()->copy(fopen('php://output', 'c')); | ||
``` | ||
|
||
## message/partial | ||
|
||
```php | ||
$block = \bashkarev\email\Parser::email([ | ||
fopen('path/to/part.1.eml', 'rb'), | ||
fopen('path/to/part.2.eml', 'rb'), | ||
]); | ||
$block->getMessage(); | ||
``` | ||
|
||
## message/rfc822 | ||
|
||
```php | ||
$file = fopen('path/to/file.eml', 'rb'); | ||
$container = \bashkarev\email\Parser::email($file); | ||
$message = $container->getAttachments()[0]->getMessage(); | ||
``` | ||
|
||
## message/feedback-report | ||
```php | ||
$file = fopen('path/to/file.eml', 'rb'); | ||
$container = \bashkarev\email\Parser::email($file); | ||
foreach ($container->getAttachments() as $attachment) { | ||
if ($attachment->getMimeType() === 'message/feedback-report') { | ||
/** | ||
* @var \bashkarev\email\messages\Feedback $feedback | ||
*/ | ||
$feedback = $attachment->getMessage(); | ||
$feedback->getType(); // Feedback::TYPE_ABUSE ... | ||
} | ||
} | ||
|
||
``` | ||
|
||
## message/external-body | ||
|
||
Supported types: url, local-file, ftp. | ||
|
||
### FTP auth | ||
```php | ||
$file = fopen('path/to/file.eml', 'rb'); | ||
$container = \bashkarev\email\Parser::email($file); | ||
foreach ($container->getAttachments() as $attachment) { | ||
if ($attachment->getStream() instanceof \bashkarev\email\transports\Ftp) { | ||
/** | ||
* @var \bashkarev\email\transports\Ftp $transport | ||
*/ | ||
$transport = $attachment->getStream(); | ||
$transport->username = 'username'; | ||
$transport->password = '******'; | ||
$attachment->save('dir/' . $attachment->getFileName('undefined')); | ||
} | ||
} | ||
``` |
29 changes: 29 additions & 0 deletions
29
forked-plugins/bp-rbe-inbound-forum-attachments/vendor/bashkarev/email/composer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"name": "bashkarev/email", | ||
"description": "Faster MIME Mail Parser could be used to parse emails in MIME format.", | ||
"keywords": ["mime", "mail", "mailparse", "email", "mime-parser", "FBL", "ARF"], | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "bashkarev", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"require": { | ||
"php": ">=5.4", | ||
"ext-mbstring": "*" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"bashkarev\\email\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"bashkarev\\email\\tests\\": "tests/" | ||
} | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "~4.4" | ||
} | ||
} |
Oops, something went wrong.