定制 abiodun/mailswifter 二次开发

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

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

abiodun/mailswifter

Composer 安装命令:

composer require abiodun/mailswifter

包简介

Mail swifter is a free mailer built on swiftmailer for html template injection and data parser

README 文档

README

Mail swifter is a free mailer built on swiftmailer for html template injection and data parser.

Installation

composer require abiodun/mailswifter

Usage

use Abiodun\MailSwifter\MailProvider

index.php

    $mail_provider = new MailProvider([
        'username' => 'username@gmail.com',
        'password' => 'password',
        'smtp' => 'smtp.gmail.com',
    ]);

    $mail_provider->from = ['username@gmail.com' => 'Testing MailSwifter'];
    $mail_provider->to = ['username@gmail.com', 'username@gmail.com' => 'Mailing'];

    $mail_provider->subject = 'New Mail Test';

    $file = __DIR__ . '/sample.html';
    $data_list = [
        'name' => ' ',
        'url' => 'http://info.google.com',
        'category' => 'Fashion',
    ];
    $resp = $mail_provider->template($file, $data_list);
    $resp = $mail_provider->send();

sample.html

    <h1>This is a sample for the mail </h1>
    <p> i surely believe this would work so well</p>

    <p>Name is: [name] </p>
    <p>Url: [url]</p>
    <p>Category: [category]</p>
    <p>i'm so happy here </p>

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-06-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固