定制 donkeycode/mail-bundle 二次开发

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

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

donkeycode/mail-bundle

最新稳定版本:v1.0.0

Composer 安装命令:

composer require donkeycode/mail-bundle

包简介

An easy way to send mail with swiftmailer and twig

README 文档

README

An easy way to send mail with twig and swift

Setup

composer require donkeycode/mail-bundle

Add in AppKernel.php

new DonkeyCode\MailBundle\DonkeyCodeMailBundle(),

Configuration

donkey_code_mail:
    mail_from: null
    reply_to: null
    options:
        header_bg: '#2d7cff'
        header_txt_color: '#ffffff'
        bg: '#efefef'
        txt_color: '#555555'
        font_family: 'Helvetica Neue'

Usage

Create your twig

{% block subject %}
Subject of mail
{% endblock %}

{% block body %}
    {% embed "DonkeyCodeMailBundle:Mails:layout.html.twig" %}
    {# For sf4 #}
    {% embed "@DonkeyCodeMail/Mails/layout.html.twig" %}
        {% block title %}Header{% endblock %}
        {% block content %}
            Body Of mail
        {% endblock %}

    {% endembed %}
{% endblock %}

Send it simply

$mailer = $this->getContainer()
    ->get('donkeycode.mailer')
    ->createMessage()
    ->setTemplate('YourBundle:Mails:invoices.html.twig', [
        'invoices' => $invoices,
    ])
    ->setTo($destMail)
    ->send();

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 3
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-11-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固