dwolke/zf-mailer
Composer 安装命令:
composer require dwolke/zf-mailer
包简介
Simple Mailer for Zend Framework 3
README 文档
README
Simple Mailer for the Zend Framework v3
WARNING: This module is currently under heavy development and is not intended for use in productive environment.
Introduction
ZfMailer is a simple e-mail module for Zend Framework 3 based on Zend\Mail. E-mails can be sent in text format or as MIME-compliant "multi-part" mails. Sending e-mails with attachments is also supported.
Currently, only sending e-mails by SMTP is supported. Maybe this module will be extended later with further possibilities.
Installation
Main Setup
- Add this module to your project by running the command
$ composer require dwolke/zf-mailer
Post Installation
After installation with composer, add the module to your application.config.php.
<?php return array( 'modules' => array( // ... 'ZfMailer', // ... ), // ... );
Settings
Copy the configuration file from vendor/dwolke/zf-mailer/config/zfmailer.local.php.dist to config/autoload/zfmailer.local.php and change the values as desired.
Options
The following options are available:
- smart_host [array] - configures the server that sends the mails
- server_name [string] - servers hostname
- server_port [string] - tcp port, default is 25
- username [string] - username for connection to the server
- password [string] - password for connection to the server
- encoding [string, optional] - default is 'UTF-8'
- default_from [string, optional] - This e-mail address for the sender will be used if no sender address is specified when sending an e-mail.
- return_path [string, optional] - Address to which bounces are sent
- reply_to [string, optional] - Address to which replys are sent.
- x_mailer [string, optinal] - Adds the 'X-Mailer' header to an e-mail
- organization [string, optional] - Adds the 'Organization' header to an e-mail
Usage
Using the mailer is quite simple.
// get the service $mailer = $serviceManager->get('ZfMailer\Service\Mailer'); // create a new mail $mailer->createNewMail($recipient, $subject, $sender); // set the content and render the e-mail body $mailer->prepareAsMultipart($mailContent, $textTemplate, $htmlTemplate); // send the e-mail $mailer->sendEmail();
That's all.
Copyright © 2012 - 2019 by dwLabs. Alle Rechte vorbehalten. 😎
dwolke/zf-mailer 适用场景与选型建议
dwolke/zf-mailer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 15 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 08 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「mailer」 「php」 「zf2」 「Zend Framework」 「e-mail」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 dwolke/zf-mailer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 dwolke/zf-mailer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 dwolke/zf-mailer 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
LosLog provides some log utility
EdpModuleLayouts is very simple Laminas module for making module-specific layouts insanely easy.
Zend Framework module to leverage the symfony dependency injection container
Creates new sare mail transport for laravel applications
RCM User HTML views/pages
Builds a Bridge between Zend Expressive and Plugin Managers of Zend\MVC
统计信息
- 总下载量: 15
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-08-11