承接 vitrus/symfony-office-graph-mailer 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

vitrus/symfony-office-graph-mailer

最新稳定版本:v0.0.7

Composer 安装命令:

composer require vitrus/symfony-office-graph-mailer

包简介

Symfony Mailer Bridge for Microsoft Graph Api Client

README 文档

README

Provides integration between the Symfony Mailer and Office365 Graph API.

  • Tested on:
    • Symfony 6.4 on php 8.1
    • Symfony 5.4 on php 7.4
  • Should work on all Symfony 5.x, 6.x, 7.x instances
    • Feel free to report issues on github if you have them
  • Does not require the Microsoft Graph API Client (speaks to Graph API directly)
  • No Guzzle or other external libraries needed, uses only Symfony HTTP Client and Symfony Mailer

Installation steps

1 add via composer

composer require vitrus/symfony-office-graph-mailer

2 Tag the transport factory in your services.yaml

We might change this package to be a bundle so this is no longer needed in the future

 Vitrus\SymfonyOfficeGraphMailer\Transport\GraphApiTransportFactory:
    tags: ['mailer.transport_factory']

3 configure mailer to use the microsoft-graph-api scheme in .env (or .env.local)

MAILER_DSN=microsoft-graph-api://{CLIENT_ID}:{CLIENT_SECRET}@{TENANT}

The tenant you use here should have permissions to send e-mail, and have access to the user you will configure as sender in your e-mails!

Feature: Store in sent items

Messages are automatically stored in Office 365 Sent Items folder, you can disable this with a custom header:

$message = (new Email())->subject($subject);

// add (falsy) text header to your Email
$message->getHeaders()->addTextHeader('X-Save-To-Sent-Items', 'false');

统计信息

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

GitHub 信息

  • Stars: 9
  • Watchers: 2
  • Forks: 10
  • 开发语言: PHP

其他信息

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