Search code examples
phpemailgoogle-app-enginegoogle-app-engine-php

Not receiving Emails on Google App Engine


I've followed the receiving mail instructions to create the following app.yaml:

runtime: php55
api_version: 1

inbound_services:
- mail

handlers:
- url: /_ah/mail/.+
  script: handle_incoming_email.php
  login: admin

my handle_incoming_email.php is similarly compact with:

<?php
syslog(LOG_INFO, 'hello from handle_incoming_email');

running in dev_appserver.py app.yaml and sending mail via http://localhost:8000/mail i get a succes message in that dev server interface and my console logs show:

INFO: hello from handle_incoming_email

INFO 2018-02-22 23:13:33,985 module.py:835] default: "POST /_ah/mail/[email protected] HTTP/1.1" 200 555

however, deploying to app engine and sending mails from two different accounts with double checking the email address, neither POSTS to /_ah/mail nor my log message with show up in the logs.


Solution

  • I've figured it out:

    I had the Identity-Aware Proxy (beta) enabled under https://console.cloud.google.com/iam-admin/iap/

    It appears the email service can not pass through this proxy. I've filed a bug report at https://issuetracker.google.com/issues/73787787