2017 © Pedro PelĂĄez
 

library goalio-mailservice

Provide configurable Mail Transport Factories for ZF2

image

goalio/goalio-mailservice

Provide configurable Mail Transport Factories for ZF2

  • Thursday, February 23, 2017
  • by pdobrigkeit
  • Repository
  • 6 Watchers
  • 13 Stars
  • 51,127 Installations
  • PHP
  • 4 Dependents
  • 0 Suggesters
  • 22 Forks
  • 5 Open issues
  • 9 Versions
  • 2 % Grown

The README.md

GoalioMailService

Version 1.2.0 Created by the goalio UG (haftungsbeschrÀnkt), (*1)

Introduction

Provide configurable Mail Transport Factory and simple messaging for ZF2, (*2)

Requirements

Features / Goals

  • Configure transport service for using Zend\Mail [COMPLETE]

Changelog

With ZF2.3 the Transport Factory changed. This made changes to the configuration in the goaliomailservice.global.php (and goaliomailservice.local.php) neccessary. I tried to check this in my own factory, but please be aware of this., (*3)

Installation

Main Setup

With composer

  1. Add this project and the requirements in your composer.json:, (*4)

    "require": {
        "goalio/goalio-mailservice": "1.*"
    }
    
  2. Now tell composer to download GoalioMailService by running the command:, (*5)

    $ php composer.phar update
    

Post installation

  1. Enabling it in your application.config.phpfile., (*6)

    <?php
    return array(
        'modules' => array(
            // ...
            'GoalioMailService'
        ),
        // ...
    );
    
  2. Copy the configuration files for local and global from ./vendor/goalio/goalio-mailservice/config/goaliomailservice.{local,global}.php.dist to ./config/autoload/goaliomailservice.{local,global}.php and change the values as desired., (*7)

  3. If you are using the FileTransport (for development) create the directory ./data/mail., (*8)

Usage

// The template used by the PhpRenderer to create the content of the mail
$viewTemplate = 'module/email/testmail';

// The ViewModel variables to pass into the renderer
$value = array('foo' => 'bar');

$mailService = $this->getServiceManager()->get('goaliomailservice_message');
$message = $mailService->createTextMessage($from, $to, $subject, $viewTemplate, $values);
$mailService->send($message);

SMTP Setup

GoalioMailService uses sendmail by default, but you can set it up to use SMTP by putting your information in the config file like this:, (*9)

$settings = array(
    'type' => 'Zend\Mail\Transport\Smtp',

    'options_class' => 'Zend\Mail\Transport\SmtpOptions',

    'options' => array(
        'host' => 'smtp.gmail.com',
        'connection_class' => 'login',
        'connection_config' => array(
            'ssl' => 'tls',
            'username' => 'YOUR-USERNAME-HERE@gmail.com',
            'password' => 'YOUR-PASSWORD-HERE'
        ),
        'port' => 587
    )
);

The Versions

23/02 2017

dev-mailjet

dev-mailjet https://github.com/goalio/GoalioMailService

Provide configurable Mail Transport Factories for ZF2

  Sources   Download

BSD-3-Clause

The Requires

 

zf2

20/05 2015

dev-master

9999999-dev https://github.com/goalio/GoalioMailService

Provide configurable Mail Transport Factories for ZF2

  Sources   Download

BSD-3-Clause

The Requires

 

zf2

27/10 2014

1.2.1

1.2.1.0 https://github.com/goalio/GoalioMailService

Provide configurable Mail Transport Factories for ZF2

  Sources   Download

BSD-3-Clause

The Requires

 

zf2

27/10 2014

1.2

1.2.0.0 https://github.com/goalio/GoalioMailService

Provide configurable Mail Transport Factories for ZF2

  Sources   Download

BSD-3-Clause

The Requires

 

zf2

18/09 2014

1.1

1.1.0.0 https://github.com/goalio/GoalioMailService

Provide configurable Mail Transport Factories for ZF2

  Sources   Download

BSD-3-Clause

The Requires

 

zf2

26/05 2014

1.0.1

1.0.1.0 https://github.com/goalio/GoalioMailService

Provide configurable Mail Transport Factories for ZF2

  Sources   Download

BSD-3-Clause

The Requires

 

zf2

23/04 2014

1.0.0

1.0.0.0 https://github.com/goalio/GoalioMailService

Provide configurable Mail Transport Factories for ZF2

  Sources   Download

The Requires

 

zf2

13/08 2013

0.1.1

0.1.1.0 https://github.com/goalio/GoalioMailService

Provide configurable Mail Transport Factories for ZF2

  Sources   Download

The Requires

 

zf2

07/02 2013

0.1.0

0.1.0.0 https://github.com/goalio/GoalioMailService

Provide configurable Mail Transport Factories for ZF2

  Sources   Download

The Requires

 

zf2