mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-10-29 12:43:25 +00:00
[Web] Update composer libraries
This commit is contained in:
1297 files changed
+71585
-24460
No files matched your search
+20
-22
@@ -2,12 +2,12 @@
|
||||
|
||||
[](https://packagist.org/packages/ddeboer/imap)
|
||||
[](https://packagist.org/packages/ddeboer/imap)
|
||||
[](https://github.com/ddeboer/imap/actions)
|
||||
[](https://github.com/ddeboer/imap/actions)
|
||||
[](https://codecov.io/gh/ddeboer/imap?branch=master)
|
||||
|
||||
A PHP IMAP library to read and process e-mails over IMAP protocol, built with robust Object-Oriented architecture.
|
||||
|
||||
This library requires PHP >= 7.4 with [IMAP](https://www.php.net/manual/en/book.imap.php),
|
||||
This library requires PHP >= 8.2 with [IMAP](https://www.php.net/manual/en/book.imap.php),
|
||||
[iconv](https://www.php.net/manual/en/book.iconv.php) and
|
||||
[Multibyte String](https://www.php.net/manual/en/book.mbstring.php) extensions installed.
|
||||
|
||||
@@ -157,7 +157,7 @@ By the way most of the common search criteria are available and functioning, bro
|
||||
References:
|
||||
|
||||
1. https://stackoverflow.com/questions/36356715/imap-search-unknown-search-criterion-or
|
||||
1. imap-2007f.tar.gz: `./src/c-client/mail.c` and `./docs/internal.txt`
|
||||
2. imap-2007f.tar.gz: `./src/c-client/mail.c` and `./docs/internal.txt`
|
||||
|
||||
#### Message Properties and Operations
|
||||
|
||||
@@ -182,19 +182,29 @@ $message->isDraft();
|
||||
$message->isSeen();
|
||||
```
|
||||
|
||||
Get message headers as a [\Ddeboer\Imap\Message\Headers](/src/Ddeboer/Imap/Message/Headers.php) object:
|
||||
Get message headers as a [\Ddeboer\Imap\Message\Headers](/src/Message/Headers.php) object:
|
||||
|
||||
```php
|
||||
$message->getHeaders();
|
||||
```
|
||||
|
||||
Get message body as HTML or plain text:
|
||||
Get message body as HTML or plain text (only first part):
|
||||
|
||||
```php
|
||||
$message->getBodyHtml(); // Content of text/html part, if present
|
||||
$message->getBodyText(); // Content of text/plain part, if present
|
||||
```
|
||||
|
||||
|
||||
Get complete body (all parts):
|
||||
|
||||
```php
|
||||
$body = $message->getCompleteBodyHtml(); // Content of text/html part, if present
|
||||
if ($body === null) { // If body is null, there are no HTML parts, so let's try getting the text body
|
||||
$body = $message->getCompleteBodyText(); // Content of text/plain part, if present
|
||||
}
|
||||
```
|
||||
|
||||
Reading the message body keeps the message as unseen.
|
||||
If you want to mark the message as seen:
|
||||
|
||||
@@ -284,24 +294,12 @@ Mockability is granted by interfaces present for each API.
|
||||
Dig into [MockabilityTest](tests/MockabilityTest.php) for an example of a
|
||||
mocked workflow.
|
||||
|
||||
## Running the Tests
|
||||
## Contributing: run the build locally
|
||||
|
||||
This library is functionally tested on [Travis CI](https://travis-ci.org/ddeboer/imap)
|
||||
against a local Dovecot server.
|
||||
Docker is needed to run the build on your computer.
|
||||
|
||||
If you have your own IMAP (test) account, you can run the tests locally by
|
||||
providing your IMAP credentials:
|
||||
First command you need to run is `make start-imap-server`, which starts an IMAP server locally.
|
||||
|
||||
```bash
|
||||
$ composer install
|
||||
$ IMAP_SERVER_NAME="my.imap.server.com" IMAP_SERVER_PORT="60993" IMAP_USERNAME="johndoe" IMAP_PASSWORD="p4ssword" vendor/bin/phpunit
|
||||
```
|
||||
Then the local build can be triggered with a bare `make`.
|
||||
|
||||
You can also copy `phpunit.xml.dist` file to a custom `phpunit.xml` and put
|
||||
these environment variables in it.
|
||||
|
||||
**WARNING** Tests create new mailboxes without removing them.
|
||||
|
||||
```
|
||||
$ docker-compose run tests
|
||||
```
|
||||
When you finish the development, stop the local IMAP server with `make stop-imap-server`.
|
||||
Reference in new issue
Block a user