承接 bernhardwebstudio/msft-graph-mailer 相关项目开发

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

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

bernhardwebstudio/msft-graph-mailer

最新稳定版本:v0.1.4

Composer 安装命令:

composer require bernhardwebstudio/msft-graph-mailer

包简介

A mailer for Symfony to send mails using Microsoft Graph

README 文档

README

A mailer for Symfony to send mails using Microsoft Graph (i.e., send Office 365/Outlook/Exchange E-Mails)

Installation

Simply install using Composer:

composer require bernhardwebstudio/msft-graph-mailer

Configuration

You need to tell Symfony that this is a mail transport:

# services.yaml
services:
  mailer.transport_factory.msftgraph:
    class: BernhardWebstudio\Mailer\Bridge\MsftGraphMailer\Transport\MsftGraphTransportFactory
    parent: mailer.transport_factory.abstract
    tags:
      - { name: "mailer.transport_factory" }

Finally, you need to configure the mailer bundle to use this transport, e.g. using an ENV variable like

MAILER_DSN=msft+graph://{client-id}:{client-secret}@outlook.com?saveToSent=1&tenant={tenant-id}

where you replace all the values in {} with your own values from your active directory.

The tenant and saveToSent options are optional.

Usage

If you set the configuration correctly, that's all, you can simply use the Symfony mailer and you will be sending the E-Mails using the Microsoft Graph API.

Please note that this transport does not support all types of E-Mail messages in its best form. Please contribute if you understand enough about MIME and Microsoft Graph to fix this.

Additionally, Microsoft imposes restrictions on the sender E-Mail you can use. Simply be aware of that when setting the From of the E-Mail, please, if you want to prevent errors.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-02-22