定制 symfony/microsoft-graph-mailer 二次开发

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

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

symfony/microsoft-graph-mailer

最新稳定版本:v8.0.0

Composer 安装命令:

composer require symfony/microsoft-graph-mailer

包简介

Symfony Microsoft Graph Mailer Bridge

README 文档

README

Provides Microsoft Graph API Email integration for Symfony Mailer.

Prerequisites

You will need to:

  • Register an application in your Microsoft Azure portal,
  • Grant this application the Microsoft Graph Mail.Send permission,
  • Create a secret for that app.

Configuration example

# MAILER
MAILER_DSN=microsoftgraph+api://CLIENT_APP_ID:CLIENT_APP_SECRET@default?tenantId=TENANT_ID

This will default to graph.microsoft.com for the Graph API and login.microsoftonline.com for authentication.

If you need to use third parties operated or specific regions Microsoft services (China, US Government, etc.), you can specify the Graph Endpoint and the Auth Endpoint explicitly.

# MAILER e.g. for China
MAILER_DSN=microsoftgraph+api://CLIENT_APP_ID:CLIENT_APP_SECRET@microsoftgraph.chinacloudapi.cn?tenantId=TENANT_ID&authEndpoint=login.partner.microsoftonline.cn

The exact URLs can be found in the Microsoft documentation:

You can also specify to not save the messages to sent items using the noSave parameter:

# MAILER
MAILER_DSN=microsoftgraph+api://CLIENT_APP_ID:CLIENT_APP_SECRET@default?tenantId=TENANT_ID&noSave=true

Troubleshooting

Beware that the sender email address needs to be an address of an account inside your tenant.

Resources

统计信息

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

GitHub 信息

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

其他信息

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