From 3ad758927fd9d53ea779ab8925ac59ebab99cd72 Mon Sep 17 00:00:00 2001 From: Floran Brutel Date: Thu, 19 Apr 2018 14:55:45 +0200 Subject: [PATCH] :doc: Better README with example --- README.md | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0729933..0d32ded 100644 --- a/README.md +++ b/README.md @@ -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 + + + +

some text

+ placeholder + + +``` + +With the plugin the following email will be generated: + +```html + + + +

some text

+ placeholder + + +``` ## Installation @@ -23,7 +49,8 @@ $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] ``` @@ -31,7 +58,7 @@ The arguments are optional. ## Credits -Developed by [Hexanet](http://www.hexanet.fr/). +Developed by [Hexanet](https://www.hexanet.fr/). ## License