On Thu, Nov 14, 2013 at 12:12 PM, Liz Stinson <[email protected]> wrote:

> GAE supposedly submits the data to my script from the incoming mail using
> POST. Per Google description (
> https://developers.google.com/appengine/docs/php/mail/):
>
> Email messages are sent to your app as HTTP requests.
>
>
> Both the $_POST and $_GET arrays are empty.
>
>

GAE sends the content of the email via the body of the POST request, not
via POST parameters. So you'll need to retrieve the body by using
*http_get_request_body* or similar:
http://php.net/manual/en/function.http-get-request-body.php

>From there you can use your preferred RFC2822 parser to parse out the email
and extract the from, subject, to, etc header fields. There are libraries
for that (you can Google them) but you can also manually extract out the
email components.

You can also use SendGrid to receive and parse email - Sendgrid handles the
job of parsing the email into a JSON file, which you can then extract using
any JSON library: https://developers.google.com/appengine/articles/sendgrid

-----------------
-Vinny P
Technology & Media Advisor
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to