【问题标题】:Platform.sh email sending with Symfony使用 Symfony 发送 Platform.sh 电子邮件
【发布时间】:2017-11-26 18:46:25
【问题描述】:

我正在尝试从我在 Platform.sh 的 Symfony 3 项目发送电子邮件。

我遵循了这个文档:https://docs.platform.sh/administration/web/email.html

我的参数.yml:

mailer_transport: sendmail
mailer_host: null
mailer_user: null
mailer_password: null
mailer_port: 465
mailer_encryption: tls

我使用带有内存假脱机的 swiftmailer。 Swiftmailer 的 send() 方法返回 true,但它似乎不依赖发送任何电子邮件。

在设置中,Master 的外发电子邮件是开启的。

我是否需要设置任何系统变量,或者我缺少什么?

【问题讨论】:

    标签: php symfony email sendmail swiftmailer


    【解决方案1】:

    在 Drupal 8 网站上使用带有 SwiftMailer 的 sendmail,我必须将 transport_mode 设置为 't' 而不是 'bs'

    # swiftmailer.transport.yml
    sendmail_mode: 't'
    

    另一种可能是使用platformsh环境变量。

    d8config:swiftmailer.transport:sendmail_mode 并将其值设置为't'

    希望它也能对您在 Symfony 上有所帮助。

    【讨论】:

      猜你喜欢
      • 2019-06-11
      • 2022-11-03
      • 2015-04-16
      • 2012-01-29
      • 2023-03-09
      • 1970-01-01
      • 1970-01-01
      • 2019-10-05
      • 1970-01-01
      相关资源
      最近更新 更多