galek/mail-fallback

This package is abandoned and no longer maintained. No replacement package was suggested.

Extension for Nette mail

v0.0.11 2017-03-21 15:16 UTC

This package is auto-updated.

Last update: 2021-06-27 14:43:22 UTC


README

MailFallback is Extension for Nette mail

Requirements

Galek/MailFallback requires PHP 5.6 or higher.

Installation

The best way install Galek/MailFallback is using Composer:

$ composer require galek/mail-fallback

Usage:

config.neon

extensions: 
    mailFallback: Galek\MailFallback\FallbackExtension
    
mailFallback:
    retryCount: 3
    retryWaitTime: 1000
    default:
        smtp: true
        host: 'smtp.server.com'
        port: 25
        secure: 'tls'
        username: 'my@server.com'
        password: 'mySecretPassword'

Presenter

    /** @var \Galek\MailFallback\MailFallback @inject */
    public $mailer;
    
    public function sendMail(\Nette\Mail\Message $mail)
    {
        $mailer = $this->mailer;
        $mailer->send($mail);
    }