Google App Engine-PHP-邮件不起作用

时间:2018-11-14 16:29:36

标签: google-app-engine php-7.2

我正在尝试通过PHP在GAE上发送电子邮件。

我从这里使用代码:cloud.google.com/appengine/docs/standard/php/mail 最小的app.yaml看起来像这样:

runtime: php72
handlers:
- url: .*
  secure: always
  script: auto

我在App Engine日志中遇到错误:

[ERROR 0 /index.php] PHP message: PHP Fatal error: Uncaught google\appengine\runtime\RPCFailedError: Remote implementation for mail.Send failed in /srv/vendor/google/appengine-php-sdk/google/appengine/runtime/VmApiProxy.php:179 Stack trace: #0 /srv/vendor/google/appengine-php-sdk/google/appengine/runtime/ApiProxy.php(40): google\appengine\runtime\VmApiProxy->makeSyncCall('mail', 'Send', Object(google\appengine\MailMessage), Object(google\appengine\base\VoidProto), 60) #1 /srv/vendor/google/appengine-php-sdk/google/appengine/api/mail/Message.php(146): google\appengine\runtime\ApiProxy::makeSyncCall('mail', 'Send', Object(google\appengine\MailMessage), Object(google\appengine\base\VoidProto)) #2 /srv/source/contactForm.php(188): google\appengine\api\mail\Message->send()

使用常规PHP mail函数时,它也会失败。

在适用于GAE PHP的本地开发环境中,它也因以下错误而崩溃:

Uncaught google\appengine\runtime\RPCFailedError: Remote implementation for mail.Send failed in /home/dima/google-cloud-sdk/platform/google_appengine/php/sdk/google/appengine/runtime/RemoteApiProxy.php:92

有什么想法吗?

0 个答案:

没有答案