mfcc / mandrill

使用蜜罐进行垃圾邮件防护和zendesk API创建工单的联系方式表单

dev-master 2013-07-26 10:07 UTC

This package is auto-updated.

Last update: 2024-08-29 03:16:47 UTC


README

Total Downloads

MfccMandrill

本模块提供了Mandrill API(https://mandrillapp.com/api/docs/)的API包装器

它基于并依赖于原始的Mandrill库(https://bitbucket.org/mailchimp/mandrill-api-php

安装

建议的安装方法是使用 composer

php composer.phar require mfcc/zendesk-mandrill:dev-master

使用方法

  1. 在您的 application.config.php 文件中启用 MfccMandrill 模块。
  2. 配置模块。将 ./vendor/mfcc/mandrill/config/module.mfcc-mandrill.local.php.dist 复制到 ./config/autoload/module.mfcc-mandrill.local.php 并更改所需的值。
  3. 获取 Mandrill 服务并调用方法(例如发送邮件)
$mandrill = $this->getServiceLocator()->get('mfccMandrillService');

$mandrill->call('messages/send', array(
      	'message' => array(
				'text' => 'test',
    			'subject' => 'example subject',
    			'from_email' => 'sender@mail.com',
    			'from_name' =>  'From Name',
    			'to' => array(
    					array('email' => 'recepient@email.com')
    			)
    		)
));

您可以在以下位置找到此模块公开的方法的文档: https://mandrillapp.com/api/docs/

或者安装 MfccMandrill 模块后,在 YOUR_APP/vendor/mandrill/mandrill/docs/index.html 中找到。