定制 nautiyal/laravel-mail-css-inliner 二次开发

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

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

nautiyal/laravel-mail-css-inliner

Composer 安装命令:

composer require nautiyal/laravel-mail-css-inliner

包简介

Laravel 5 Mail CSS Inliner Service

README 文档

README

Why?

Most email clients won't render CSS (on a <link> or a <style>). The solution is to inline your CSS directly into the HTML. Doing this by hand is tedious and difficult to maintain. The goal of this package is to automate the process of inlining that CSS before sending the emails.

How?

Using a wonderful CSS inliner package wraped in a SwiftMailer plugin and served as a Service Provider. It works without configuration

Transforming:

<html>
    <head>
        <style>
            h1 {
                font-size: 24px;
                color: #000;
            }
        </style>
    </head>
    <body>
        <h1>Your content</h1>
    </body>
</html>

Into this:

<html>
    <head>
    </head>
    <body>
        <h1 style="font-size: 24px; color: #000;">Your content</h1>
    </body>
</html>

Installation

Begin by installing this package through Composer. Edit your project's composer.json file to require nautiyal/laravel-mail-css-inliner.

This package requires Laravel 5.x

$ composer require nautiyal/laravel-mail-css-inliner

Once this operation completes, you must add the service provider. Open app/config/app.php, and add a new item to the providers array.

Nautiyal\MailCssInliner\MailCssInlinerProvider::class,

Found a bug?

Please, let me know! Send a pull request or a patch. Questions? Ask! I will respond to all filed issues.

License

This package is open-sourced software licensed under the MIT license

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-08-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固