2017 © Pedro Peláez
 

library zend-mail-extensions

Slam extensions for zendframework/zend-mail

image

slam/zend-mail-extensions

Slam extensions for zendframework/zend-mail

  • Friday, March 16, 2018
  • by Slam
  • Repository
  • 1 Watchers
  • 3 Stars
  • 117 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 7 % Grown

The README.md

Slam Zend\Mail extensions

Build Status Code Coverage Packagist, (*1)

Extensions for Zend\Mail, (*2)

Installation

Execute:, (*3)

composer require slam/zend-mail-extensions, (*4)

Usage

The main functionality of this package is the Protocol\TimeKeeperSmtpProxy, which allows to handle SMTP server that implements a reuse_time_limit like Postfix (ref: http://www.postfix.org/postconf.5.html#smtp_connection_reuse_time_limit)., (*5)

References:, (*6)

  1. https://github.com/zendframework/zend-mail/pull/27
  2. https://github.com/zendframework/zend-mail/pull/117
  3. https://github.com/zendframework/zend-mail/pull/131

Example:, (*7)

/**
 * QUIT instruction is disabled by default
 * @see https://github.com/zendframework/zend-mail/pull/117
 *
 * All the Zend defaults options are still available
 * @see https://docs.zendframework.com/zend-mail/transport/smtp-authentication/
 */
$transport = new \Slam\Zend\Mail\Transport\Smtp();

$message = new \Zend\Mail\Message();
$message->setFrom('test@test.com');
$message->addTo('test@test.com');
$message->setSubject('Test');
$message->setBody('Test');

$transport->send($message);

sleep(305);

// $transport will automatically reconnect to the SMTP server
$transport->send($message);

The Versions