This repository was archived by the owner on Jan 14, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +30
-3
lines changed Expand file tree Collapse file tree 1 file changed +30
-3
lines changed Original file line number Diff line number Diff line change 2
2
3
3
[ ![ 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 )
4
4
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
+ ```
6
32
7
33
## Installation
8
34
@@ -23,15 +49,16 @@ $mailer->registerPlugin(new ImageEmbedPlugin());
23
49
or for symfony in your services.yaml:
24
50
``` yml
25
51
Hexanet\Swiftmailer\ImageEmbedPlugin :
26
- arguments : ['%kernel.root_dir%/../web/']
52
+ arguments :
53
+ - ' %kernel.root_dir%/../web/'
27
54
tags : [swiftmailer.default.plugin]
28
55
` ` `
29
56
30
57
The arguments are optional.
31
58
32
59
## Credits
33
60
34
- Developed by [Hexanet](http ://www.hexanet.fr/).
61
+ Developed by [Hexanet](https ://www.hexanet.fr/).
35
62
36
63
## License
37
64
You can’t perform that action at this time.
0 commit comments