ride/lib-mailer
最新稳定版本:1.1.0
Composer 安装命令:
composer require ride/lib-mailer
包简介
Library to offer editable templates for mails in the PHP Ride framework
README 文档
README
Library to offer editable templates for mails in the PHP Ride framework.
What's In This Library
MailType
The MailType interface specifies an available mail. It can be considered an event which is triggered when certain business logic occurs. They are defined by the system/developer. Eg. A user is registered; A user is activated; An inquiry is requested; ...
MailTypeProvider
The MailTypeProvider interface is used for the data storage of mail types. Use it to retrieve a single or all mail types.
MailTemplate
The MailTemplate interface represents a preset of an outgoing mail. Recipients and variables are defined by it and are replaced by the actual values when the mail is being send.
MailTemplateProvider
The MailTemplateProvider interface is used for the data store of mail templates. Use it o retrieve a single or all mail templates.
MailHandler
The MailHandler interface is responsible for filling in the variables and sending the mail.
MailService
The MailService class is a facade to this library. You can use this class to retrieve the providers or send a mail.
Code Sample
Check the following code sample to some of the possibilities of this library.
<?php use ride\service\MailService; function sendMail(MailService $mailService) { $contentVariables = array('user' => 'My User', 'url' => 'http://www.github.com'); $recipientVariables = array('recipient1' => 'user@domain.com', 'recipient2' => 'john@doe.com'); $mailTemplate = 5; $locale = 'en'; $mailService->sendMailTemplate($contentVariables, $recipientVariables, $mailTemplate, $locale); }
Related Modules
Installation
You can use Composer to install this library.
composer require ride/lib-mailer
统计信息
- 总下载量: 1.17k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 4
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-02-22