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

Commit

Permalink
Merge pull request #16 from Hexanet/better-readme
Browse files Browse the repository at this point in the history
:doc: Better README with example
  • Loading branch information
nclsHart authored Apr 19, 2018
2 parents 8b4a69d + 3ad7589 commit d3e1f4b
Showing 1 changed file with 30 additions and 3 deletions.
33 changes: 30 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit d3e1f4b

Please sign in to comment.