定制 stolfam/mandrill 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

stolfam/mandrill

最新稳定版本:v1.3.2

Composer 安装命令:

composer require stolfam/mandrill

包简介

Easy-to-use PHP library for sending emails with Mandrill.

README 文档

README

Easy-to-use PHP library for sending emails with Mandrill.

Latest Stable Version Total Downloads Latest Unstable Version License Monthly Downloads Daily Downloads composer.lock

Installation

composer require ataccama/mandrill

Usage

$mandrill = new Ataccama\MandrillMailer(API_KEY, SUB_ACCOUNT);

Send Mandrill template

$mandrill
    ->addFrom('email@address.com', 'Name')
    ->addTo('email@address.com')
    ->setSubject('Email subject')
    ->templateName('tmp-name');

Add variables to template

$mandrill->addAttributes([
   'variable_key_1' => 'variable 1 content',
   'variable_key_2' => 'variable 2 content'
]);

Add attachments

addAttachment("filename.txt", "file content")

Send basic html email

$mandrill
    ->addFrom('email@address.com')
    ->addTo('email@address.com', 'Name')
    ->setSubject('Events confirmation')
    ->setHtmlBody('<h1>Love you</h1><p>Soo <strong>much</strong>!</p>');

Send

$mandrill->send();

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-05-23