2017 © Pedro PelĆ”ez
 

library mail-manager

Provide send and development email.

image

h4kuna/mail-manager

Provide send and development email.

  • Friday, February 2, 2018
  • by h4kuna
  • Repository
  • 1 Watchers
  • 3 Stars
  • 495 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 2 % Grown

The README.md

[Abandoned]

MailManager

Build Status Latest stable Downloads this Month Scrutinizer Code Quality Coverage Status, (*1)

This extension for Nette framework 2.4+. Support testing mails, (*2)

Installation to project

$ composer require h4kuna/mail-manager

How to use

Add to your file NEON, (*3)

extensions:
    mailManagerExtension: h4kuna\MailManager\DI\MailManagerExtension

mailManagerExtension:
    from: default@example.com
    templateDir: %appDir%/template # home for mail template
    debugMode: %debugMode% # enable FileMailer whose save email to file
    tempDir: %tempDir%/mail # where save email to file

    # optional
    plainMacro: # where will find email like plain text alternative default: '=file=-plain'
    assetsDir: # path to assets
    returnPath: # where back mail whose send non exists mail
    messageFactory: # prepare for Message instance
    globalVars: # global variables for all templates
        foo: bar
        bar: %variable%

    # development    
    live: FALSE # how long live email file in temp directory
        # - FALSE - forever
        # - '+1 minute' - relative time (default)

Support different templates for plain text and for html., (*4)

$message = $mailer->createMessage('body', ['foo' => $foo, 'bar' => $bar]);

// if you have body.latte (for html) and body-plain.latte (for plain text) in same directory, then is used. And bind variables onetime.

$mailer->send($message);

Prepare latte file in $templateDir/test-file.latte, (*5)

<strong>variable foo has value:</strong> {$foo}

Send mail., (*6)

/* @var $mailer h4kuna\MailManager\MailManager */
$message = $mailer->createMessage('test-file', ['foo' => 'bar'])
           ->addTo('Milan Matejcek <milan.matejcek@gmail.com>');
/* @var $message Nette\Mail\Message */
$message->addBcc('bar@example.com'); // avaible is 'mail' or 'name <mail>'
$mailer->send($message); // if anything bad throw exception

Features

  • display email as html page
  • on development machine default save to file
  • autoremove saved email
  • if path name containt word plain, than set plain text mail to send
  • parse system mail and send, if you haven't installed sendmail on server

The Versions

02/02 2018

dev-master

9999999-dev https://github.com/h4kuna/mail-manager

Provide send and development email.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Milan Matějček

02/02 2018

v1.2.1

1.2.1.0 https://github.com/h4kuna/mail-manager

Provide send and development email.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Milan Matějček

18/11 2016
25/06 2014

v1.0.1

1.0.1.0 https://github.com/h4kuna/mail-manager

Provide send and development email

  Sources   Download

MIT

The Requires

 

The Development Requires

by Milan Matějček

23/05 2014

v1.0.0

1.0.0.0 https://github.com/h4kuna/mail-manager

Provide send and development email

  Sources   Download

MIT

The Requires

 

The Development Requires

by Milan Matějček