Skip to content

Commit a8f3761

Browse files
authored
Specify proper .eml mime type when saving the file into storage. (#5)
1 parent ee7bac6 commit a8f3761

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/Listeners/ExportMessage.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ private function storeMessage()
6767

6868
$this->filesystem
6969
->disk($storageOptions->disk)
70-
->put($storageOptions->fullpath(), $this->message->toString());
70+
->put($storageOptions->fullpath(), $this->message->toString(), [
71+
'mimetype' => $storageOptions::MIME_TYPE,
72+
]);
7173

7274
event(new MessageStored($this->message, $storageOptions));
7375
}

src/StorageOptions.php

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
class StorageOptions
1515
{
1616
const EXTENSION = 'eml';
17+
const MIME_TYPE = 'message/rfc822';
1718

1819
/**
1920
* @var string

0 commit comments

Comments
 (0)