Download the PHP package implico/email-framework without Composer

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

implico-email-framework

Smarty Template Engine email coding framework. A kind of preprocessor that facilitates daily work with email templates.

Concept & example

When developing an email template, you often face issues such as:

Produced code is often hard to maintain.

The framework brings configured Smarty plugins and CLI interface, so you can develop project like this:

And run the watcher:


The code is converted (may vary according to the actual settings) to:


Installation

To use the framework you need the following software:

PHP installation

Framework installation

  1. Open a console/terminal window.
  2. Run:

  3. Add the Composer's global bin folder to your PATH variable. First, to get the path, run:

    And then:

    • Windows: follow the instructions
    • Linux: edit the /etc/environment file (or /etc/profile if you don't see the PATH definition there) as a root user and restart system
  4. You can now start a new project - see the examples section to find out more.

Framework update


CLI

The global executable is named iemail. Run it from your projects dir (e.g. email-projects).

Initialize projects directory

Creates a new projects directory (where your projects will be kept) with specified project_name. Creates _custom subdirectory, with master config file and custom plugins dir.

Options:

Example:

Initialize new project

Creates a new project with specified project_name. Run it in the directory created with create command.

Contents of the base_project_name are copied into a new directory. First, the script searches for it in the current working directory, then in the core framework samples.

Options:

Example (creates test project based on the multilang core example):

Compile project

Compiles project with specified project_name. Options:

Example (compiles and then watches test project for changes):

Send test email(s)

Sends test email(s) for the specified project_name. All images are converted and embedded as cids. SMTP and default options are set in the configuration file.

Options:

Example (sends test project to [email protected]):

Gulp integration

The newly initialized project directory comes with package.json and gulpfile.js, allowing you to use the gulp watch and Browsersync live browser reload on each source code change. Technically, the watcher just executes the compiler in a normal way and then refreshes the browser.

For the first run, after using iemail create, enter the new project directory and execute (assuming nodejs and gulp are already installed):

Then you can use a simple gulp api:

Compiles a project and opens a web browser. Then watches the project, compiling and reloading the browser on changes.

Options:


Directory structure

Framework

The framework directory structure overview:

Projects dir

The _custom subdirectory contains optional: custom master config file and your own Smarty plugins - place them in the plugins directory.

Other dirs contain per project files. Each of them has the following structure:


Plugin reference

Reference scheme:

Where:

Attribute names which are equal to the HTML ones are not camelCase (like cellpadding, bordercolor), others like lineHeight are.

Standard parameters are:

These won't be described in the reference below.

Function plugin has only the start tag, e.g. {margin height=20}, other (block) must have the ending tag, e.g. {table}...{/table}.

Specify width, height, font sizes without units.

Table

Notes:

Tr

Td

Notes:

Vertical margin (function)

Creates a row with specified height.

Font

Notes:

Link

Notes:

Button

Notes:

Image (function)

Notes:

Force strip

To force white space strip (in the formatted version), use the following syntax: #(strip)[stripped_code]#(/strip)


Configuration

Default settings are defined in the master file core/config.conf. To change them, edit (if they do not exist - create) the following files:

All most recent options are described in the master file. You can change (among others):


Examples

Starting a new project

To create a directory where you will keep your projects, use the create command:

This will create a directory named email-projects with custom config and plugins folder.

Then, go to this directory and run the init command:

By default, the base (copy source) project is the plain sample from the core (unless you create own plain project, then it will be the default for bootstraping). You can specify base project by the second parameter:

If the base project is not found in the current directory, it will be searched in the framework core sample directory.

After initialization, run compiler in watch mode:

Open the script HTML file located in your project outputs directory. Refresh on every compilation to see the changes.

Alternatively, use the more convenient gulp integration guide to watch for changes.

Plain

This is a plain, bootstrap project. Includes only a layout with the main table defined.

Grid

This shows how to build more complex projects, including lists and buttons.

Responsive

Presents the way to build a responsive (in fact - fluid) project. Notes:

Multilang

Multi-language project presents two ways of defining language-specific content for English and Polish. The concept is that the layout template (layout.tpl) is extended by language scripts (see Smarty template inheritance), in this case en.tpl and pl.tpl.

First way is to set script-specific config values in the configs/scripts directory, and then just use it like {#title#}.

Second way is to inject content by using blocks in language scripts.


Integration

To use the framework in your own PHP scripts:


Quick tips


TODO

[x] integration with gulp for:

[ ] use of TinyPNG

[ ] error handling when one of required project subdirectories does not exist


Alternatives

Take a look at other interesting tools and frameworks:


All versions of email-framework with dependencies

PHP Build Version
Package Version
Requires smarty/smarty Version 3.*.*
symfony/console Version 2.*
gajus/dindent Version 2.*
phpmailer/phpmailer Version 5.*
tijsverkoyen/css-to-inline-styles Version 1.*
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 implico/email-framework contains the following files

Loading the files please wait ...