Skip to content

Commit 5725da3

Browse files
committed
Add contentId method
1 parent 193f3f3 commit 5725da3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,12 +458,12 @@ To conveniently work with attachments, the `Message` class includes methods that
458458

459459
For each attachment, you may access the following properties:
460460

461-
- `$attachment->filename(): string`: Retrieve the attachment's filename.
461+
- `$attachment->filename(): string|null`: Retrieve the attachment's filename.
462462
- `$attachment->contents(): string`: Retrieve the attachment's contents.
463+
- `$attachment->contentId(): string|null`: Retrieve the attachment's content ID (cid).
463464
- `$attachment->contentType(): string`: Retrieve the attachment's content type.
464465
- `$attachment->contentStream(): StreamInterface`: Retrieve the attachment's contents as a stream.
465466

466-
467467
> [!important]
468468
> The attachment's content type is determined by the `Content-Type` header provided in the email, and may not always be accurate.
469469
> If `application/octet-stream` is returned, using [`mime_content_type()`](https://www.php.net/manual/en/function.mime-content-type.php) over the filename or contents may be used to clarify the type.

0 commit comments

Comments
 (0)