-
-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Docs For Mailer Image CID (#422)
* fix tests in GH actions + docs * published mailer nuget
- Loading branch information
Showing
8 changed files
with
36 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -345,6 +345,36 @@ Sender("[email protected]") | |
|
||
Attach multiple files by passing an `Attachment` to the `Attach()` method. | ||
|
||
Each attachment has a few fields to assign: | ||
|
||
- `Bytes`: The `byte[]` of the file you are attaching. | ||
- `Name`: The name of the file to attach. | ||
- `ContentId`: Often used for embedding images into emails. Assign a value that is unique within your email template. | ||
|
||
##### Embedding Images | ||
|
||
To embed images into your email you can assign the `ContentId` field with a unique value that will also be used in your email. | ||
|
||
For example: | ||
|
||
```csharp | ||
emailMessage | ||
.Attach(new Attachment | ||
{ | ||
Name = "My Image", | ||
Bytes = myBytes, | ||
ContentId = "my-image" | ||
}); | ||
``` | ||
|
||
```html | ||
<html> | ||
<img src="cid:my-image" /> | ||
</html> | ||
``` | ||
|
||
Coravel will automatically link the embedded resources to the email properly for you. | ||
|
||
#### Auto-Detect Email Address And Name | ||
|
||
Using an `object` that has a `public` field or property `Email` and `Name`, you can pass it to the `To()` method. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters