Note that there are some explanatory texts on larger screens.

plurals
  1. POPhp Curl add string file as a post field
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COI know nothing about php/mailgun and something about email construction. Are you able to produce and email with the above code that "doesn't" work, or are you simply looking for a way to call php curl code with a string instead of a file? If it's the former, check the email's source file against the examples in [rfc2183](http://www.ietf.org/rfc/rfc2183.txt), in section 3. Either way, what format is your image string in? For example, is it base64 encoded, or do you expect mailgun to encode it?
      singulars
    2. COA little more explanation is that I am switching from our current SMPT servers to mailGun. We use an old version of phpmailer to send the files which do base64 encode. So I have the raw and the base64 version. Also its a PNG file and the above code sample is what I am trying to execute.
      singulars
    3. COWhat errors are you receiving? According to several stackoverflow questions, php curl can handle multiple input forms for data eg. [CURL PHP send image](http://stackoverflow.com/questions/3433542/curl-php-send-image). You could skip the array technique and build the complete urlencoded string as in the manual like `param1=val1&param2=val2&...`. If that doesn't work, maybe mailgun's api only likes inline= images posted to them a special way. You could send a working example to a webserver that just echos the input back to you so you could learn to mimic that format.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload