Say, I have an application/xhtml+xml content and a gif image. How can I serve (not render) these two in a single http get request (using PHP)? It should be a multipart/related content. After reading this RFC, I tried something; but it did not work. (No, I am not trying to send emails with attachment)
Thanks in advance.
EDIT: Finally I succeeded doing that. I think, it will be useful if I write how I did that. I have added this as an answer. Please look below.
Here is it [worked for me] (No, I did not used PHPMailer; may be it is useful, but I could not make it working):
You can load the xml from file also. But, note that if your xml refers the image (like I did here) you need to refer that with its Content-ID. Also, note the ‘<‘ ‘>’ characters in the Content-ID field of the image (after the boundary) and the ‘cid:’ notation in the place where it is referred. It worked for me. Thanks to Carlos Lima for spending time for me.