SDDProductions/SDDSparkPostTransportBundle

SDDProductions/SDDSparkPostTransportBundle 包

0.1 2017-01-03 08:39 UTC

This package is not auto-updated.

Last update: 2024-09-14 20:25:21 UTC


README

此包是 DigitalState/Platform-Transport-BundleSparkPost/php-sparkpost 之间的集成

配置

通常的 composer require

传输和配置文件配置

传输

您需要添加一个带有以下数据的新的传输

{
    "api_key":"YOUR_SPARKPOST_API_KEY",
    "allowed_sender_domains":
    [
        "example.com",
        "other.example.com"
    ]
}

api_key 是不言而喻的。 allowed_sender_domains 是当前允许并配置在 SparkPost 中的域名列表。

配置文件

您需要添加一个带有以下数据的新的配置文件

字段 send_from 用于配置通过 传输 发送电子邮件所使用的电子邮件地址

可能的值

  • 从特定电子邮件发送
{
    "send_from": {
        "fullName" : "John Doe",
        "email" : "john.doe@example.com"
    }    
}
  • WIP:CURRENT_USER from 地址将是当前连接用户的电子邮件地址(按下发送按钮的用户)
{
   "send_from":"CURRENT_USER"
}
  • WIP: ENTITY_OWNER from 地址将是收件人 所有者 的电子邮件地址
{
   "send_from":"ENTITY_OWNER"
}