This repository has been archived by the owner on Jan 14, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from Hexanet/better-readme
:doc: Better README with example
- Loading branch information
Showing
1 changed file
with
30 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,33 @@ | |
|
||
[![Build Status](https://travis-ci.org/Hexanet/swiftmailer-image-embed.svg)](https://travis-ci.org/Hexanet/swiftmailer-image-embed) [![Total Downloads](https://poser.pugx.org/hexanet/swiftmailer-image-embed/downloads.png)](https://packagist.org/packages/hexanet/swiftmailer-image-embed) [![Latest Stable Version](https://poser.pugx.org/hexanet/swiftmailer-image-embed/v/stable.png)](https://packagist.org/packages/hexanet/swiftmailer-image-embed) | ||
|
||
Swiftmailer plugin to automatically embed images into message. | ||
Swiftmailer plugin to automatically embed images into message by using CID (Content-ID). | ||
|
||
See https://swiftmailer.symfony.com/docs/messages.html#embedding-inline-media-files for more informations. | ||
|
||
Example: | ||
|
||
```html | ||
<html> | ||
<head></head> | ||
<body> | ||
<p>some text</p> | ||
<img src="images/swiftmailer_rocks.png" alt="placeholder"> | ||
</body> | ||
</html> | ||
``` | ||
|
||
With the plugin the following email will be generated: | ||
|
||
```html | ||
<html> | ||
<head></head> | ||
<body> | ||
<p>some text</p> | ||
<img src="cid:[email protected]" alt="placeholder"> | ||
</body> | ||
</html> | ||
``` | ||
|
||
## Installation | ||
|
||
|
@@ -23,15 +49,16 @@ $mailer->registerPlugin(new ImageEmbedPlugin()); | |
or for symfony in your services.yaml: | ||
```yml | ||
Hexanet\Swiftmailer\ImageEmbedPlugin: | ||
arguments: ['%kernel.root_dir%/../web/'] | ||
arguments: | ||
- '%kernel.root_dir%/../web/' | ||
tags: [swiftmailer.default.plugin] | ||
``` | ||
The arguments are optional. | ||
## Credits | ||
Developed by [Hexanet](http://www.hexanet.fr/). | ||
Developed by [Hexanet](https://www.hexanet.fr/). | ||
## License | ||
|