jliglesias/laravel-azure-mailer 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

jliglesias/laravel-azure-mailer

最新稳定版本:v0.1.1

Composer 安装命令:

composer require jliglesias/laravel-azure-mailer

包简介

Provides Microsoft Azure ACS integration for laravel. Azure Communication Services allows you to easily add real-time multimedia voice, video, and telephony-over-IP communications features to your applications. The Communication Services Email client libraries also allow you to add chat and EMAIL fu

README 文档

README

Provides Azure Communication Service integration for Symfony Mailer / Laravel.

Requirements

Installation

First time using Azure ECS? Create your Azure account, if you don’t have one already.

  1. Download Composer if not already installed

  2. On your project directory run on the command line composer require jliglesias/laravel-azure-mailer

  3. Get your Azure CS Access Key and Service Endpoint.

Configuration

Add entry to [root-of-laravel]/config/mail.php:

  <?php

    ...

    'mailers' => [
        //...other drivers

        'azure' => [
            'transport'             => 'azure',
            'resource_name'         => env('AZURE_MAIL_RESOURCE_NAME'),
            'endpoint'              => env('AZURE_MAIL_ENDPOINT', 'https://my-acs-resource-name.communication.azure.com'),
            'access_key'            => env('AZURE_MAIL_KEY'),
            'api_version'           => env('AZURE_MAIL_API_VERSION', '2023-03-31'),
            'disable_user_tracking' => env('AZURE_MAIL_DISABLE_TRACKING', false),
        ],
    ]

  ?>

Add entry to [root-of-laravel]/.env:

  
  #...other entries

  # Mail service entries... 
  MAIL_MAILER=azure
  
  # Azure Service entries
  AZURE_MAIL_RESOURCE_NAME=my-acs-resource-name
  # AZURE_MAIL_ENDPOINT= #optional
  AZURE_MAIL_KEY=AzureAccessToken
  # AZURE_MAIL_API_VERSION=2023-03-31 #optional
  # AZURE_MAIL_DISABLE_TRACKING=false #optional
  

Documentation

Build powerful, cloud-based communication and customer engagement experiences by adding email integration with Azure Communication Service to your apps.

  • Azure Communication Service Docs: English
  • Prepare Email Communication resource for Azure Communication Service Docs: English
  • Sending mail with Laravel (10x): English

Examples

Simple mail sending:

Mail::to($request->user())
    ->cc($moreUsers)
    ->bcc($evenMoreUsers)
    ->send(new OrderShipped($order));

or

Mail::to([new Address('user.name@domain.com', 'My User Name'), ...])
    ->cc([new Address('user.name@domain.com', 'My User Name'), ...])
    ->bcc([new Address('user.name@domain.com', 'My User Name'), ...])
    ->send('my.view');

Sending mail with attachments:

$data = [
      to => [new Address('user.name@domain.com', 'My User Name'), ...],
      subject => 'Subject'
];
$files = [
      public_path('files/160031367318.pdf'),
      public_path('files/1599882252.png'),
];

Mail::send('my.view', $data, function($message)use($data, $files) {
            
            $message->to($data["to"])
                    ->subject($data["subject"]);

            foreach ($files as $file){
                $message->attach($file);
            }

 });

If you need more information, read the Laravel (10x) documentation: English

Last change

** 0.1.0-beta.1

  • Main release.

** 0.1.1.-beta.1

  • Remove folders and files for testing event dispatch and callbacks using AJAX (JQUERY).

License

MIT license. Copyright (c) 2024 - Juan Luis Iglesias For more information, see the LICENSE file.

jliglesias/laravel-azure-mailer 适用场景与选型建议

jliglesias/laravel-azure-mailer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 116 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 01 月 17 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「mailer」 「symfony」 「php」 「email」 「azure」 「driver」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 jliglesias/laravel-azure-mailer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 jliglesias/laravel-azure-mailer 我们能提供哪些服务?
定制开发 / 二次开发

基于 jliglesias/laravel-azure-mailer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-01-17