承接 linio/mail 相关项目开发

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

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

linio/mail

最新稳定版本:2.0.0

Composer 安装命令:

composer require linio/mail

包简介

Abstracts mailer service communication, such as Mandrill and Amazon SES

README 文档

README

Latest Stable Version License Build Status Scrutinizer Code Quality

Linio Mail is yet another component of the Linio Framework. It aims to abstract email messaging by supporting multiple adapters.

Install

The recommended way to install Linio Mail is through composer.

$ composer install linio/mail

Tests

To run the test suite, you need install the dependencies via composer, then run PHPUnit.

$ composer install
$ vendor/bin/phpunit

Usage

The library is very easy to use: first, you have to register the service. For Silex, a service provider is included. Just register it:

<?php

$app->register(new \Linio\Component\Mail\Provider\MailServiceProvider(), [
    'mail.adapter_name' => 'mandrill',
    'mail.adapter_options' => [
        'api_key' => '',
    ],
]);

Note that must provide an adapter name and an array of options. Each adapter has different configuration options that are injected by the AdapterFactory.

To start sending messages:

<?php

use Linio\Component\Mail\Message;
use Linio\Component\Mail\Contact;

$message = new Message();
$message->setSubject('hello world');
$message->setFrom(new Contact('Barfoo', 'bar@foo.com'));
$message->addTo(new Contact('Foobar', 'foo@bar.com'));
$message->setTemplate('my_template');
$message->setData(['id' => '1']);

$app['mail.service']->send($message);

统计信息

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

GitHub 信息

  • Stars: 5
  • Watchers: 55
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2015-03-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固