[REBOL] Re: Trying to insert picture using send/subject
From: petr:krenzelok:seznam:cz at: 11-Jun-2008 10:43
Gregg Irwin napsal(a):
> Hi Alan,
>
> AD> send/subject/attach dechert-gmail.com join "Dear Mr. Dechert:^M" read
> AD> file:///myfile.txt "This is the Subject" %mypicture.jpg
>
> AD> Okay, this worked to attach the picture, but I want the picture in the body
> AD> of the email. For example, if you use html format with Outlook Express and
> AD> then do Insert|picture the recipient will see the picture in the email
> AD> without having to click on the attachment.
>
> I've never done that, but I'm pretty sure it won't be a one-liner.
>
> Look at an email that's formatted how you want. Probably a
> multipart/related, with plain text and html content sections, and the
> HTML refs an attached image with an embedded content ID (just glance
> at one quickly here).
>
Hi,
I was asked to produce script some time ago, which would allow to have
e-postcard inline, and I am not sure it was done by multipart/related
only. There was a "strange" element called "cid:" (referenced by content
ID?) I suggest to look at http://www.view-card.com
Here's content of message, containing inline postcard:
-------------------------
This is a multi-part message in MIME format.
--------------020901080506000807040501
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
PopCard Greetings E-mail Greetings Card
--------------020901080506000807040501
Content-Type: multipart/related;
boundary="------------060004020903050504090102"
--------------060004020903050504090102
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<img src="cid:part1.1213173441.02090003-popsoft.info" border="0"><br>
<font face="verdana,helvetica,geneva" size="1">
This card powered by <a href="http://www.view-card.com/">View Card</a> <a href="http://greeting.view-card.com/">Greeting</a><br>
</font>
</body>
</html>
--------------060004020903050504090102
Content-Type: image/jpeg;
name="popcard1213173441.jpg"
Content-Transfer-Encoding: base64
Content-Id: <part1.1213173441.02090003-popsoft.info>
Content-Disposition: inline;
filename="popcard.jpg"
/9j/4AAQSkZJRgABAQAAAQABAAD//gA7Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcg
Cheers,
-pekr-