Download the PHP package remp/mailer-skeleton without Composer

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

REMP Mailer Skeleton

This is a pre-configured skeleton of REMP Mailer application with simple installation.

Mailer serves as a tool for configuration of mailers, creation of email layouts and templates, and configuring and sending mail jobs to selected segments of users.

Installation

Docker

The simplest possible way is to run this application in docker containers. Docker Compose is used for orchestrating. Except of these two application, there is no need to install anything on host machine.

Recommended (tested) versions are:

Steps to install application within docker

  1. Get the application

    A) Using Composer:

    B) Using GitHub:

  2. Prepare environment & configuration files

    No changes are required if you want to run application as it is.

    Note: nginx web application runs on the port 80. Make sure this port is not used, otherwise you will encounter error like this when initializing Docker:

    In such case, change port mapping in docker-composer.override.yml. For example, the following setting maps internal port 80 to external port 8080, so the application will be available at http://mailer.press:8080.

  3. Setup host

    Default host used by application is http://mailer.press. This domain should by pointing to localhost (127.0.0.1), so add it to local /etc/hosts file. In addition, we recommend adding mailhog.mailer.press domain for testing. Use the following commands:

  4. Start Docker containers

    You should see logs of starting containers. This may include errors, because application was not yet initialized. Enter the application docker container:

    When inside the container, add required permissions:

    After that, choose and run one of the two installation options:

    • Fully ready application with demo data:

    • No demo data:
  5. Log-in to Mailer

    Access application via web browser. Default configuration:

    IMPORTANT: Please run make install every time you update Mailer-skeleton using composer update.

Manual installation

Dependencies

Installation

Clone this repository, go inside the folder and run the following to create configuration files from the sample ones:

Edit .env file and set up all required values such as database and Redis connections.

Now run the installation:

As an alternative, run the following to include seeding of demo values in the installation:

Mailer demo overview

Default integrations

After the installation of Mailer skeleton, Mailer uses default (local) integrations that need to be replaced with real implementations before going live. The local integrations serve as references and defaults to allow sending testing emails without doing any extra work.

Authentication

SimpleAuthenticator is responsible for authentication to the tool.

List of credentials is configured in config.local.neon file. Default credentials are:

Do not run Mailer publicly with SimpleAuthenticator using the default credentials.

Mailers integration

Outgoing emails are sent by SmtpMailer. To configure a different mailer (e.g. MailGun), consult the Mailers section in the documentation. Configuration of the SMTP mailer is loaded from config.local.neon, see the section local_configs (which overrides any configuration options stored in the database):

Key remp_smtp_host points to mailhog. This is an internal docker address of the mailhog docker container. The container runs MailHog, which is a web based SMTP testing tool. Therefore, all emails sent from the Demo Mailer instance are captured by MailHog, and are easily viewable in the MailHog web interface at http://mailhog.mailer.press.

User-base integration

Mailer depends on external authority to get information about users. As a default source of users, Dummy implementation of user provider is used. Provider lists 2 demo users ([email protected], [email protected]). See the documentation on how to implement different user provider.

Segment integration

To send a newsletter, Mailer needs to get a segment of users who should receive it. To complement default user-base integration, there's also Dummy implementation of segment provider, always returning the same segment with both demo users.

Debug mode

After the installation, Mailer is running in debug mode and all debug information is shown. Avoid running this mode in production. To disable this mode, change the value of ENV key in .env configuration file:

Basic scenario - send email to user segment

To test the Mailer functionality, we recommend going through the following basic scenario:

  1. Log-in to Mailer at URL http://mailer.press
  2. Go to Jobs
  3. Click Add new job
  4. Select values in Include segments, Newsletter list, and Email A alternative inputs. Keep other inputs empty.
    • Demo values of Emails, Layouts and Newsletter lists are seeded by default in demo installation.
  5. Click Save and start button
  6. Wait approximately a minute, so Mailer processes the job. Check the job status at Jobs page.
  7. After the job is processed (status "DONE"), go to MailHog at http://mailhog.mailer.press/ and check that emails were successfully received.

Customization

Mailer-skeleton is ready for customization. Please see the mailer-module documentation for more information.

As a sample, mailer-skeleton provides app/Commands/SampleCommand.php, extending the Command class. It is registered as a new command in the config.local.neon file. Run it by connecting to the container:

and executing the command:

Troubleshooting

Some known errors that have occurred and how to fix them.

Docker SMTP error "Cannot assign requested address"

In some cases (such as running containers for the first time), a docker container might end up reporting this error message. Simply restarting the problematic container should help.


All versions of mailer-skeleton with dependencies

PHP Build Version
Package Version
Requires remp/mailer-module Version ^3.5
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 remp/mailer-skeleton contains the following files

Loading the files please wait ....