Skip to content

Commit 4e08d24

Browse files
committed
wip
1 parent 8d48cd1 commit 4e08d24

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ composer require beyondcode/laravel-mailbox
2626

2727
## Usage
2828

29-
``` php
30-
31-
```
29+
Take a look at the [official documentation](https://docs.beyondco.de/laravel-mailbox).
3230

3331
### Testing
3432

config/mailbox.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
*/
2727
'store_incoming_emails_for_days' => 7,
2828

29+
/*
30+
* By default, this package only stores incoming email messages
31+
* when they match one of your mailboxes. To store all incoming
32+
* messages, modify this value.
33+
*/
2934
'only_store_matching_emails' => true,
3035

3136
/*

src/InboundEmail.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use ZBateson\MailMimeParser\Message as MimeMessage;
1111
use ZBateson\MailMimeParser\Header\AddressHeader;
1212
use ZBateson\MailMimeParser\Header\Part\AddressPart;
13+
use ZBateson\MailMimeParser\Message\Part\MessagePart;
1314

1415
class InboundEmail extends Model
1516
{
@@ -110,6 +111,9 @@ protected function convertAddressHeader($header): array
110111
return [];
111112
}
112113

114+
/**
115+
* @return MessagePart[]
116+
*/
113117
public function attachments()
114118
{
115119
return $this->message()->getAllAttachmentParts();

tests/MailboxRouteTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function it_matches_requirements()
103103
$this->assertFalse($route->matches($message));
104104

105105
$route = new Route(Route::FROM, '{from}@domain.com', 'SomeAction@handle');
106-
$route->where('from', '[a-z]+');
106+
$route->where('from', '[A-Za-z]+');
107107

108108
$this->assertTrue($route->matches($message));
109109
}

0 commit comments

Comments
 (0)