Skip to content
This repository has been archived by the owner on Feb 20, 2021. It is now read-only.

📧 Swiftmailer plugin to automatically embed images into message

License

Notifications You must be signed in to change notification settings

TheRedDot/swiftmailer-image-embed

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swiftmailer Image Embed Plugin

❗ This package is abandoned and no longer actively maintained.

Total Downloads Latest Stable Version

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:[email protected]" 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.

About

📧 Swiftmailer plugin to automatically embed images into message

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%