You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,3 +47,18 @@ foreach($parts['IMAGE/PNG'] as $image) {
47
47
file_put_contents($image->name, $image->content);
48
48
}
49
49
```
50
+
51
+
## Content IDs
52
+
53
+
Some emails embed images into the HTML content using `cid:` urls. These URLs link to the content ID of another part within the email, rather than being an absolute `https://` URL that can be resolved normally.
54
+
55
+
If one exists, this content ID will be exposed via the `contentId` property of the `Part`:
56
+
57
+
```php
58
+
foreach($parts['IMAGE/PNG'] as $image) {
59
+
// Store the file as in the above example:
60
+
file_put_contents($image->name, $image->content);
61
+
// You would then want to store this relationship in your database:
0 commit comments