Download the PHP package pluswerk/mail-logger without Composer

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

Packagist Release Travis GitHub License Build Status

+Pluswerk TYPO3 extension: Mail Logger

This is an TYPO3 extension with some mail functions:

  1. E-mail logging
  2. E-mail templates

Extension installation

Install via composer or just copy the files into the TYPO3 extension folder:

Add the Typoscript files to your sites Typoscript:

1. E-mail logging

The extension automatically log all outgoing mails of the TYPO3 system, which are sent via the TYPO3 mail API. Just install the extension and it works. All outgoing mails can be found in the backend module of this TYPO3 mail logger.

By default the maximum logging time of e-mails is 30 days and can be changed as following: see strtotime The mails will be anonymized after 7 days by default. It can be changed to anonymize directly, by setting anonymizeAfter to 0.

2. E-mail templates

You can configure TYPO3 e-mail templates, written in Fluid, which are editable from editors (in the database) and configured via TypoScript (in VCS).

How does this work? E-mails will be basically configured in a TypoScript configuration (configuration of the sender address for example). Afterwards a database entry will be generated from the editor, which extends this template with additional information (fluid template or receiver for example). The instance of such an e-mail can be extended or overridden afterwards via php in your own extension (for example: dynamic receiver).

TypoScript example

You always have to create a TypoScript template for a mail. The "label" is the only required field, the orher fields are optional.

E-mail templates in database

E-mail templates will be stored in the database. Just create a record "E-mail template". The TypoScript template will be selected there. The message will be rendered by Fluid, so it is possible to print variables or use ViewHelpers.

Example message:

sending E-mails via PHP

E-mail instances "\Pluswerk\MailLogger\Domain\Model\Mail\TemplateBasedMailMessage" inherit from SwiftMailer class "\Swift_Message". Therefor an e-mail instance have got following functions: http://swiftmailer.org/docs/messages.html The easiest way is to use the functions of the "\Pluswerk\MailLogger\Utility\MailUtility" class.

basic sample:

E-mail template in certain language

example - passing E-mail parameters and sending attachment (FPDF for example)

You should always catch exceptions in your php code. Experience has shown that editors often don't add a template (or translation) etc. Corresponding errors should somehow be handled!

Custom fluid templates

Sometimes you additionally want to wrap the mail templates from database with your own markup. Therefore we provide the option to customize the mail for your needs via fluid. Again - via Typoscript - you can configure a rendering definition for every mail template.

The Variables "message" and "mailTemplate" are automatically provided to your template. You can use the actual message by simply wrapping it with a "f:format.raw"-viewhelper. You can provide your own partial- and layout-paths for every template you add. Alternatively it will use the default paths provided by this extension.

You can add your own parameters to the template via "settings"-option.

example - Use a e-mail template in your own plugin

If a mail template can be selected dynamically by the editor, you can integrate a Flexform in the plugin, adding the following configuration:

DKIM signing of mails (NOT SUPPORTED IN VERSION 2.0 until now)

You can set a DKIM-signing for every mailtemplate you use for spam protection reasons. Therefore you have to define typoscript keys which you can select in the backend of a mail template.

Please note that you have to strip "-----BEGIN RSA PRIVATE KEY-----" and "-----END RSA PRIVATE KEY-----", as they are added from php with special chars you don't want to type via typoscript. So only paste your private keychain as key.

For an example regarding using DKIM signing and adding the TXT-records to your DNS you can visit this article

Key: Your private key without "-----BEGIN RSA PRIVATE KEY-----" and "-----END RSA PRIVATE KEY-----" Domain: The domain from which you want to send your mail (e.g. [email protected]) Selector will most likely remain "default".


All versions of mail-logger with dependencies

PHP Build Version
Package Version
Requires php Version ~8.1.0 || ~8.2.0 || ~8.3.0
composer-runtime-api Version ^2
typo3/cms-core Version ^11.5.0 || ^12.4.0
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 pluswerk/mail-logger contains the following files

Loading the files please wait ....