Download the PHP package rsvpify/laravel-mail-auto-embed without Composer

On this page you can find all versions of the php package rsvpify/laravel-mail-auto-embed. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-mail-auto-embed

Actions Status

Laravel Mail Auto Embed

Install

You can install the package via composer:

This package uses Laravel 5.5 Package Auto-Discovery.
For previous versions of Laravel, you need to add the following Service Provider:

Usage

Its use is very simple, you write your markdown normally:

When sending, it will replace the link that would normally be generated:

<img src="https://domain.com/products/product-1.png">

by an embedded inline attachment of the image:

<img src="cid:[email protected]">.

It also works for raw html too:

If you do not want to use automatic embedding for specific images (because they are hosted elsewhere, if you want to use some kind of image tracker, etc.) simply add the attribute data-skip-embed in the image tag:

Local resources

For local resources that are not available publicly, use file:// urls, example

Configuration

The defaults are set in config/mail-auto-embed.php. You can copy this file to your own config directory to modify the values using this command:

Explicit embedding configuration

By default, images are embedded automatically, unless you add the data-skip-embed attribute.

You can also disable auto-embedding globally by setting the MAIL_AUTO_EMBED environment variable to false. You can then enable embedding for specific images with the data-auto-embed attribute.

Base64 embedding

If you prefer to use Base64 instead of inline attachments, you can do so by setting the MAIL_AUTO_EMBED_METHOD environment variable to base64.

Note that it will increase the e-mail size, and that it won't be decoded by some e-mail clients such as Gmail.

Mixed embedding methods

If you want to use both inline attachment and Base64 depending on the image, you can specify the embedding method as the data-auto-embed attribute value:

Embedding entities

You might want to embed images that don't actually exist in your filesystem (stored in the database).

In that case, make the entities you want to embed implement the EmbeddableEntity interface:

Then, you can use the embed:ClassName:id syntax in your e-mail template:

Contributing

Please feel free to submit pull requests if you can improve or add any features.

We are currently using PSR-2. This is easy to implement and check with the PHP Coding Standards Fixer.

Donate with Paypal


All versions of laravel-mail-auto-embed with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.0
illuminate/contracts Version >=5.3
illuminate/support Version >=5.3
illuminate/mail Version >=5.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rsvpify/laravel-mail-auto-embed contains the following files

Loading the files please wait ....