Download the PHP package jacerider/mail_theme without Composer

On this page you can find all versions of the php package jacerider/mail_theme. 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 mail_theme

CONTENTS OF THIS FILE

INTRODUCTION

Provides email wrapping HTML and styling.

REQUIREMENTS

This module requires the Mailsystem module.

INSTALLATION

Install as you would normally install a contributed Drupal module. Visit https://www.drupal.org/node/1897420 for further information.

HOW IT WORKS

Every outgoing email is wrapped in an HTML template through hook_mail_alter().

If your theme has a logo-email.png file at its root, that image is used in the email header.

COLOR VARIABLES

The message body may reference the wrapper's color variables with a {{ variable }} placeholder, for example:

Link

This works in any email body, including the account email templates at /admin/config/people/accounts. Available placeholders:

{{ body_bg }} {{ content_bg }} {{ content_color }} {{ header_bg }} {{ header_color }} {{ primary_bg }} {{ primary_color }} {{ secondary_bg }} {{ secondary_color }}

Only these color variables are substituted, and the body is never evaluated as a Twig template - it is a plain allow-list substitution, safe to expose in the admin UI. Unknown placeholders are left untouched.

SENDING AS HTML

Mail Theme produces HTML, but the configured mail formatter runs after hook_mail_alter() and can convert the body back to plain text. Two setups are supported:

  1. Keep your existing formatter and make sure it preserves HTML. With the SMTP module, enable "Send emails as HTML" (the smtp_allowhtml setting) on its configuration page.

  2. Use the bundled "Mail Theme (HTML formatter)" plugin. On the Mail System (mailsystem) settings page, set it as the Formatter and leave your sender (PHP mailer, SMTP Mailer, ...) unchanged. This formatter never strips the HTML, so no per-sender option is required.

All versions of mail_theme with dependencies

PHP Build Version
Package Version
Requires drupal/core Version ^10.3 || ^11
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 jacerider/mail_theme contains the following files

Loading the files please wait ...