2017 © Pedro Peláez
 

library zf2-mail-service

Service manager configurator for Zend\Mail

image

51systems/zf2-mail-service

Service manager configurator for Zend\Mail

  • Saturday, November 9, 2013
  • by 51systems
  • Repository
  • 1 Watchers
  • 0 Stars
  • 416 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

zf2-mail-service

A configurable service for Zend\Mail, (*1)

Configuration

Configure your mail settings using the mail configuration key., (*2)

return array (
    'mail' => array (
        'message' => array (
            'from' => 'no-reply@localhost',
            'from_name' => 'localhost'
        ),

        'transport' => array (
            'name' => 'file',
            'options' => array (
                'path' => 'data/mail'
            )
        )
));

SMTP Configuration Example:, (*3)

return array (
    'mail' => array (
        'message' => array (
            'from' => 'no-reply@ethicaladdiction.com',
            'from_name' => 'Ethical Addiction'
        ),

        'transport' => array (
            'name' => 'smtp',
            'options' => array (
                'name' => 'gmail.com',
                'host' => 'smtp.gmail.com',
                'port'              => 465,
                'connection_class' => 'login',
                'connection_config' => array (
                    'ssl' => 'ssl',
                    'username' => 'no-reply@gmail.com',
                    'password' => 'no-reply-password'
                )
            )
        )
    )
);

Usage

$mailFactory = $this->getServiceLocator()->get('mail');

$viewModel = new ViewModel(array(
    'foo' => 'bar'
));
$viewModel->setTemplate('_mail/text/message.phtml');

$message = $mailFactory->prepareMessage($viewModel);
$message->setSubject('Test Message');
$message->setTo('test@example.com');

$transport = $mailFactory->getTransport();
$transport->send($message);

The Versions

09/11 2013

dev-master

9999999-dev https://github.com/51systems/zf2-mail-service

Service manager configurator for Zend\Mail

  Sources   Download

LGPL-3.0

The Requires

 

mail zend

09/11 2013

0.1.2

0.1.2.0 https://github.com/51systems/zf2-mail-service

Service manager configurator for Zend\Mail

  Sources   Download

LGPL-3.0

The Requires

 

mail zend

23/09 2013

0.1.1

0.1.1.0 https://github.com/51systems/zf2-mail-service

Service manager configurator for Zend\Mail

  Sources   Download

LGPL-3.0

The Requires

 

mail zend

22/09 2013

0.1

0.1.0.0 https://github.com/51systems/zf2-mail-service

Service manager configurator for Zend\Mail

  Sources   Download

LGPL-3.0

The Requires

 

mail zend