thereddot / swiftmailer-image-embed
Swiftmailer plugin to automatically embed images into message
Installs: 41 350
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 8
Open Issues: 0
Requires
- php: >=7.1
- swiftmailer/swiftmailer: ^6.0
Requires (Dev)
- phpunit/phpunit: ^7.0
Suggests
- openbuildings/swiftmailer-css-inliner: Inline css in your Swiftmailer messages
Replaces
- hexanet/swiftmailer-image-embed: v2.1.4
README
❗ This package is abandoned and no longer actively maintained.
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> <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> <head></head> <body> <p>some text</p> <img src="cid:1eda5ca8666e64003917d06b34bbd2f7@swift.generated" alt="placeholder"> </body> </html>
Installation
composer require thereddot/swiftmailer-image-embed
Usage
use Hexanet\Swiftmailer\ImageEmbedPlugin; $mailer = new Swift_Mailer($yourTransport); $mailer->registerPlugin(new ImageEmbedPlugin());
or for symfony in your services.yaml:
Hexanet\Swiftmailer\ImageEmbedPlugin: arguments: - '%kernel.root_dir%/../web/' tags: [swiftmailer.default.plugin]
The arguments are optional.
Credits
Forked from Hexanet/swiftmailer-image-embed.
License
Swiftmailer Image Embed Plugin is licensed under the MIT license.