Skip to content
This repository was archived by the owner on Jan 14, 2019. It is now read-only.

Commit d3e1f4b

Browse files
authored
Merge pull request #16 from Hexanet/better-readme
:doc: Better README with example
2 parents 8b4a69d + 3ad7589 commit d3e1f4b

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

README.md

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,33 @@
22

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)
44

5-
Swiftmailer plugin to automatically embed images into message.
5+
Swiftmailer plugin to automatically embed images into message by using CID (Content-ID).
6+
7+
See https://swiftmailer.symfony.com/docs/messages.html#embedding-inline-media-files for more informations.
8+
9+
Example:
10+
11+
```html
12+
<html>
13+
<head></head>
14+
<body>
15+
<p>some text</p>
16+
<img src="images/swiftmailer_rocks.png" alt="placeholder">
17+
</body>
18+
</html>
19+
```
20+
21+
With the plugin the following email will be generated:
22+
23+
```html
24+
<html>
25+
<head></head>
26+
<body>
27+
<p>some text</p>
28+
<img src="cid:[email protected]" alt="placeholder">
29+
</body>
30+
</html>
31+
```
632

733
## Installation
834

@@ -23,15 +49,16 @@ $mailer->registerPlugin(new ImageEmbedPlugin());
2349
or for symfony in your services.yaml:
2450
```yml
2551
Hexanet\Swiftmailer\ImageEmbedPlugin:
26-
arguments: ['%kernel.root_dir%/../web/']
52+
arguments:
53+
- '%kernel.root_dir%/../web/'
2754
tags: [swiftmailer.default.plugin]
2855
```
2956
3057
The arguments are optional.
3158
3259
## Credits
3360
34-
Developed by [Hexanet](http://www.hexanet.fr/).
61+
Developed by [Hexanet](https://www.hexanet.fr/).
3562
3663
## License
3764

0 commit comments

Comments
 (0)