Hi there - I have a very small application that works as follows:

1.  I send an email to mailgun
2.  Mailgun parses the message and POST it to my web page/controller over 
HTTP
3.  My application has a single controller (no models or views) with one 
method that currently only does this:
$this->log($this->request->data);
4.  Here is some additional information on the attachment fields from mailgun 
when the POST to my service.

attachment-xstringattached file (‘x’ stands for number of the attachment). 
Attachments are handled as file uploads, encoded as multipart/form-data.
content-id-mapstringJSON-encoded dictionary which maps Content-ID (CID) of 
each attachment to the corresponding attachment-x parameter. This allows 
you to map posted attachments to tags like <img src='cid'> in the message 
body.

Anyhow, the issue is that I can't seem to figure out how to retrieve the *
attachment-1*, nor can I see it in  the response.   

Here is a dump of my request object received when a new message is 
received.  Note that the [content-id-map] and [attachment-count] are both 
there.   The [attachment-1] is also referenced in the [content-id-map]

*******
    [recipient] => [email protected]

    [sender] => [email protected] <[email protected]>

    [subject] => SUBJECT OF MESSAGE

    [from] => mdayt <[email protected] <[email protected]>>

    [X-Envelope-From] => <[email protected] <[email protected]>>

    [Return-Path] => <[email protected] <[email protected]>>

    [From] => mday <[email protected] <[email protected]>>

    [Content-Type] => multipart/alternative; 
boundary="Apple-Mail=_EC882749-B764-43B-9769-3F4850B9F3"

    [Subject] => SUBJECT OF MESSAGE

    [Date] => Wed, 20 Mar 2013 06:02:00 -0400

    [References] => 
<[email protected]<[email protected]>
>

    [To] => "[email protected]" <
[email protected]>

    [Message-Id] => 
<[email protected]<[email protected]>
>

    [Mime-Version] => 1.0 (Mac OS X Mail 6.3 \(1503\))

    [X-Mailgun-Incoming] => Yes

    [token] => 48km59sauktziefvfs6ndfalfh5kr0emkroa0g78irt8

    [signature] => d525e5b382f4182d035019c1e300d2f643d1d242a6552c04650d84f0

*    [attachment-count] => 1*

    [body-plain] => > BODY OF MESSAGE.    MESSAGE SHOULD HAVE 1 ATTACHMENT

   [stripped-text] => > BODY OF MESSAGE.    MESSAGE SHOULD HAVE 1 ATTACHMENT

*    [content-id-map] => {"<
[email protected]<99098d0f-79dd-44a9-ac75-b65899c12...@vlan1.phub.net.cable.rogers.com>>":
 
"attachment-1"}*

)
Any assistance that can be provided would be a HUGE help!!!

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to