popov/zfc-mail

ZF2 mail managment module

Installs: 134

Dependents: 1

Suggesters: 0

Security: 0

Stars: 3

Watchers: 1

Forks: 0

Open Issues: 0

Type:zf-module

dev-master 2018-05-26 11:29 UTC

This package is auto-updated.

Last update: 2024-04-07 01:21:59 UTC


README

Usage

Main feature is action field which allow use named values for sending message without id reference. The best way for naming is user_add or status_inProgress where the first part is module mnemo and the second is action mnemo.

In your Listener you can use this something like this

/** @var Mail $mail */
$mail = $em->getRepository(Mail::class)->findOneBy(['action' => 'user_add', 'type' => Mail::TYPE_MAIL]);
$mailService->send($mail, [$user->getEmail()], ['user' => $user, 'password' => $e->getParam('password')]);