craftcms/microsoft-graph-mailer 问题修复 & 功能扩展

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

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

craftcms/microsoft-graph-mailer

Composer 安装命令:

composer require craftcms/microsoft-graph-mailer

包简介

Microsoft Graph Mailer adapter for Craft CMS

README 文档

README

Microsoft Graph icon

Microsoft Graph Mailer for Craft CMS

This plugin provides a Microsoft Graph mailer adapter for Craft CMS.

Requirements

This plugin requires Craft CMS 5.8.0 or later, and PHP 8.2 or later.

Installation

You can install this plugin from the Plugin Store or with Composer.

From the Plugin Store

Go to the Plugin Store in your project’s Control Panel and search for “Microsoft Graph Mailer”. Then press “Install”.

With Composer

Open your terminal and run the following commands:

# go to the project directory
cd /path/to/my-project.test

# tell Composer to load the plugin
composer require craftcms/microsoft-graph-mailer

# tell Craft to install the plugin
./craft plugin/install microsoft-graph-mailer

Microsoft Prerequisites

  • Microsoft Azure Portal account
  • Microsoft 365 licensed mailbox

Microsoft Setup

1. Create the app

  • Go to ManageApp registrations and press New registration.
  • Give your app a Name.
  • Under Supported account types, select Accounts in this organizational directory only (Single tenant).
  • Press Register. The app will be created, and you’ll be taken to its overview page.

2. Create credentials

  • Beside Client credentials, press Add a certificate or secret.
  • Under Client secrets, press New client secret. Give it a description and preferred expiration timeframe, then press Add.
  • Copy the Application (client) ID, Directory (tenant) ID, and the secret Value somewhere safe. You’ll need these values to configure the Craft CMS mailer.

Note

It won’t be possible to re-retrieve the secret’s value once you’ve left the page.

3. Grant permissions

  • Go to ManageApp registrations[your app]ManageAPI permissions and press Add a permission.
  • Under Microsoft APIs, select Microsoft Graph.
  • Select Application permissions (not Delegated).
  • Select the checkbox for MailMail.Send.
  • Press Add permissions. The permission will show in the table with a status of “Not granted for [your organization name]”.
  • Press Grant admin consent for [your organization name]. The permission should now show in the table with a status of “Granted for [your organization name]”.

Plugin Setup

Once Microsoft Graph Mailer is installed:

  1. Go to SettingsEmail.
  2. Change the Transport Type setting to Microsoft Graph Mailer. Also, ensure that your System Email Address in your Craft Email Settings matches the licensed mailbox you want to send emails from.
  3. Enter your Azure App Client ID (Application (client) ID).
  4. Enter your Azure App Client Secret (secret Value).
  5. Enter your Azure App Tenant ID (Directory (tenant) ID).
  6. If you need to use graph and auth endpoints other than the default, you can fill out Graph Endpoint and Auth Endpoint fields.
  7. If you want to save the messages to sent items, toggle Save to sent items on.
  8. Click Save.

craftcms/microsoft-graph-mailer 适用场景与选型建议

craftcms/microsoft-graph-mailer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 44 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 12 月 09 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 craftcms/microsoft-graph-mailer 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: mit
  • 更新时间: 2025-12-09