damilaredev/laravel-email
Composer 安装命令:
composer require damilaredev/laravel-email
包简介
A collection of high-quality, unstyled components for creating beautiful emails using Laravel
关键字:
README 文档
README
Laravel Email The next generation of writing emails.High-quality, unstyled components for creating emails.
GitHub
Introduction
A collection of high-quality, unstyled components for creating beautiful emails using Laravel. It reduces the pain of coding responsive emails with dark mode support. It also takes care of inconsistencies between Gmail, Outlook, and other email clients for you.
Why
We believe that email is an extremely important medium for people to communicate. However, we need to stop developing emails like 2010, and rethink how email can be done in 2022 and beyond. Email development needs a revamp. A renovation. Modernized for the way we build web apps today.
Install
composer require damilaredev/laravel-email
Getting started
Add the component to your email template. Include styles where needed.
<x-laravel-email-html> <x-laravel-email-head> <link rel="dns-prefetch" href="//fonts.gstatic.com"> <x-laravel-email-font :font-family="'Br Firma'" :web-font="[ 'url' => 'https://fonts.gstatic.com/s/opensans/v18/mem8YaGs126MiZpBA-UFVZ0e.ttf', 'format' => 'truetype' ]" :font-style="'normal'" :font-weight="400" /> </x-laravel-email-head> <x-laravel-email-body style="margin-left:auto;margin-right:auto;margin-top:auto;margin-bottom:auto;background-color:rgba(255, 255, 255, 1);font-family:Open Sans, ui-sans-serif, system-ui, -apple-system,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Ubuntu,sans-serif" > <x-laravel-email-container style="margin-left:auto;margin-right:auto; max-width:50em;margin:10px auto;"> <x-laravel-email-section> <x-laravel-email-heading style="font-size:1.75rem;line-height:43.99px;font-weight:700;text-align:left; color: rgba(80, 85, 94, 1);"> Laravel Email </x-laravel-email-heading> </x-laravel-email-section> </x-laravel-email-container> </x-laravel-email-body> </x-laravel-email-html>
Components
A set of standard components to help you build amazing emails without having to deal with the mess of creating table-based layouts and maintaining archaic markup.
HTML
<x-laravel-email-html lang="en" dir="ltr"> <x-laravel-email-link href="https://example.com"> Click Me </x-laravel-email-link> </x-laravel-email-html>
Head
<x-laravel-email-head> <title>email title</title> </x-laravel-email-head>
Heading
<x-laravel-email-heading as="h1">Lorem Ipsum</x-laravel-email-heading>
Link
<x-laravel-email-link href="https://example.com"> Example </x-laravel-email-link>
Image
<x-laravel-email-img src="dog.jpg" alt="dog" width="200" height="200" /> # Props | Name | Type | Default | Description | | ------ | ------ | ------- | ---------------------------------- | | alt | string | | Alternate description for an image | | src | string | | The path to the image | | width | string | | The width of an image in pixels | | height | string | | The height of an image in pixels |
Divider
<x-laravel-email-hr />
Paragraph
<x-laravel-email-text>Lorem Ipsum</x-laravel-email-text>
Container
<x-laravel-email.container> <x-laravel-email-link href="https://example.com" style="font-weight: 500; color: #0000;"> Click here </x-laravel-email-link> </x-laravel-email.container>
Body
<x-laravel-email-html lang="en"> <x-laravel-email-body style="background-color: rgba(37, 60, 172, 1);"> <x-laravel-email-section> <x-laravel-email-column style="width: 50%"> {{-- First column --}} </x-laravel-email-column> <x-laravel-email-column style="width: 50%"> {{-- Second column --}} </x-laravel-email-column> </x-laravel-email-section> </x-laravel-email-body> </x-laravel-email-html>
Row
<x-laravel-email-row> <x-laravel-email-column>A</x-laravel-email-column> <x-laravel-email-column>B</x-laravel-email-column> <x-laravel-email-column>C</x-laravel-email-column> </x-laravel-email-row>
Section
{{-- A Simple Section --}}
<x-laravel-email-section>
<x-laravel-email-text>Lorem Ipsum</x-laravel-email-text>
</x-laravel-email-section>
{{-- Formatted with `rows` and `columns` --}}
<x-laravel-email-section>
<x-laravel-email-row>
<x-laravel-email-column>Column 1, Row 1</x-laravel-email-column>
<x-laravel-email-column>Column 2, Row 1</x-laravel-email-column>
</x-laravel-email-row>
<x-laravel-email-row>
<x-laravel-email-column>Column 1, Row 2</x-laravel-email-column>
<x-laravel-email-column>Column 2, Row 2</x-laravel-email-column>
</x-laravel-email-row>
</x-laravel-email-section>
Font
<x-laravel-email-html lang="en"> <x-laravel-email-head> <x-laravel-email-font font-family="Br Firma" fallback-font-family="Verdana" :web-font="[ 'url' => 'https://fonts.gstatic.com/s/opensans/v18/mem8YaGs126MiZpBA-UFVZ0e.ttf', 'format' => 'truetype' ]" font-style="normal" font-weight="400" /> </x-laravel-email-head> </x-laravel-email-html>
Support
All components were tested using the most popular email clients.
| Gmail ✔ | Apple Mail ✔ | Outlook ✔ | Yahoo! Mail ✔ | HEY ✔ | Superhuman ✔ |
Development
Install dependencies
// PHP >= 8.1 is required
composer install
Tests
composer ci
Credits
- React Email (React Email)
- Bu Kinoshita (@bukinoshita)
- Zeno Rocha (@zenorocha)
License
MIT License
damilaredev/laravel-email 适用场景与选型建议
damilaredev/laravel-email 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 35 次下载、GitHub Stars 达 5, 最近一次更新时间为 2023 年 11 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「email」 「components」 「laravel」 「views」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 damilaredev/laravel-email 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 damilaredev/laravel-email 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 damilaredev/laravel-email 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Web Font Loader gives you added control when using linked fonts via @font-face.
Extensible library for building notifications and sending them via different delivery channels.
Email+ extends Kirby's email capabilities by adding support for multiple email services using the same Kirby email API.
Ariadne Component Library: xml writer and parser Component
Ariadne Component Library: Cache Component
Ariadne Component Library: hierarchical configuration management Component
统计信息
- 总下载量: 35
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 12
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-11-18