1

我想在 Ubuntu 实例上通过 PHP 站点的开发人员脚本使用 Amazon 的 SES(简单电子邮件服务)。

到目前为止,我成功

  1. 验证电子邮件
    ./ses-verify-identity.pl -k ./aws-credentials -v email@example.com
  2. 使用ses-send-email.pl相同的凭据发送测试电子邮件

但是当我尝试将它们绑定到 php.ini 中的 sendmail_path 配置中时

sendmail_path = "/opt/third-party/amazon/ses/ses-send-email.pl -k /opt/third-party/amazon/ses/aws-credentials -f email@example.com -r"

我在 Apache 错误日志中得到的只是:

Unknown option: oi
Usage:
    ses-send-email.pl [--help] [-e URL] [-k FILE] [--verbose] -s SUBJECT -f
    FROM_EMAIL [-c CC_EMAIL[,CC_EMAIL]...] [-b BCC_EMAIL[,BCC_EMAIL]...]
    TO_EMAIL[,TO_EMAIL]...

    ses-send-email.pl [--help] [-e URL] [-k FILE] [--verbose] -r [-f
    FROM_EMAIL] [TO_EMAIL[,TO_EMAIL]...]

有人可以帮我吗?

4

1 回答 1

1

发生错误是因为 PHPMailer使用以下选项调用Postfix sendmail(1)-oi

  -oi    When reading a message from standard  input,  don't
         treat  a line with only a . character as the end of
         input.

这不是由ses-send-email.pl.

一种可能的解决方法是放弃该选项

于 2012-05-31T20:13:26.370 回答