承接 t4web/mail 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

t4web/mail

Composer 安装命令:

composer require t4web/mail

包简介

ZF2 Module. Send mails, managing mail templates and mail log.

README 文档

README

Build Status codecov.io Scrutinizer Code Quality

ZF2 Module. Send mails, managing mail templates and mail log.

Installation

Main Setup

By cloning project

Clone this project into your ./vendor/ directory.

With composer

Add this project in your composer.json:

"require": {
    "t4web/mail": "~1.0.0"
}

Now tell composer to download T4web\Mail by running the command:

$ php composer.phar update

#### Post installation

Enabling it in your `application.config.php`file.

```php
<?php
return array(
    'modules' => array(
        // ...
        'T4web\Mail',
    ),
    // ...
);

Configuring

For define mail templates, describe it in config:

't4web-mail' => [
    // Global for all mails
    'from-email' => 'support@your-domain.com',

    // Global for all mails
    'from-name' => 'Your project name',

    'templates' => [

        // Template id
        T4web\Mail\Template::FEEDBACK_ANSWER => [
            'subject' => 'Feedback answer',
            'template' => 't4web-mail/template/feedback-answer',
            'layout' => T4web\Mail\Template::LAYOUT_DEFAULT,
        ],
    ],

    'layout' => [

        // Layout id => layout template
        T4web\Mail\Template::LAYOUT_DEFAULT => 't4web-mail/layout/default',
    ],
],

Template may be like this template/feedback-answer.phtml

Using

$sender = $this->getServiceLocator()->get(\T4web\Mail\Sender::class);
$to = 'receiver@email.com';
$data = [
    'userName' => 'Max',
    'message' => 'My message',
    'answer' => 'My answer',
];
$sender->send($to, \T4web\Mail\Template::FEEDBACK_ANSWER, $data);

统计信息

  • 总下载量: 56
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2016-03-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固