Download the PHP package wasabi/wasabimail without Composer

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

Wasabi Mail Module for Zend Framework 2

Latest Stable Version Total Downloads Latest Unstable Version License

This Email module enhances ZF2 email functionality for a convenient usage. It supports file attachments and template email composition.

Configuration

The Mail Module is configured as a service and registered to the service manager. You have 3 default env-types for configuration in vendor/WasabiMail/config.php:

  1. local - sended emails are saved as text files in vendor/WasabiMail/localMails
  2. develop - for staging or development servers. It is supposed that a Mail-Server is accessible. Emails are sended to the given address in the config.php
  3. production - The transporter is SendMail. This can only be changed in the Module.php

You can change this behavior in the Module.php if necessary.

Setting the Environment type

It is recommended to set the env-type in the local.php of the config-folder. Normaly this file will not be deployed and should differ from the specific server environment.

Copy the following code into the local.php

 "env" => array(
     "type" => "local"
    #"type" => "develop"
    #"type" => "production"
 ),

Make sure that only one type is active.

Examples

Simple Usage

$mail = $this->getServiceLocator()->get("Mail");
$mail->setBody("Hello World");
$mail->setTo("[email protected]");
$mail->send();

Using Html Templates

Using a template for sending emails is based on the ViewModel approach of ZF2. You only need to create a new ZF2 ViewModel instance, set your template, fill in your variables and pass it to the setBody method of the Mail Module.

WasabiMail is bundled with a responsive Html Email-Template that you can customize for your own needs. This template is tested with common email clients like Microsoft Outlook or Google Mail.

$mail = $this->getServiceLocator()->get("Mail");
$viewModel = new ViewModel();
$viewModel->setTemplate("responsive");
$mail->setBody($viewModel);
$mail->send();

The template path stack is set to WasabiMail/templates. If necessary you can change this in the config.php

File Attachments

Files can be attached to the email before sending it by providing their paths with addAttachment the method.

Usage

$mail->addAttachment('data/mail/attachments/file1.pdf');

You can call the method for each attachment you want to attach. You can use the second argument for another name of the file you want to attach. Otherwise the real file name will be used.


All versions of wasabimail with dependencies

PHP Build Version
Package Version
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 wasabi/wasabimail contains the following files

Loading the files please wait ....