mhonarc-users

Re: Adding pictures in message

1997-03-24 09:20:40
I've noticed that when a message is added to an archive, it is placed
between the <PRE> and </PRE>.

This is true for text/plain messages, and any message processed
by the text/plain filter.

I was wandering if it is possible add a
URL (for an image) in the message so that when we view the message it will
show the image.  I have tried the following to the message:

</PRE>
<IMG SRC="picture.gif">
<PRE>

BUT Mhonarc converts it to the following:

&lt;/PRE&gt;
&lt;IMG SRC="ww_logo.gif"&gt;
&lt;PRE&gt;

Because the message is text/plain.

I was wondering if it is possible to alter mhonarc in some way such that
when mhonarc parses the message, it will recognise the tags (say):

<PICTURE>

and

</PICTURE>

Therefore we can insert an image URL in the message and not have it
converted to preformatted text.

Of course you can make the modifications.  You can always
override/replace the default filters as you see fit.  You just
need to know Perl and read the about MIMEFILTERS resource.

However, is adding your modifications really necessary?  If you
want to include HTML markup in your messages, just include an
HTML part (ie. denoted by the text/html content type).


Basically, I just want to be able to add an image inside the message by
inserting a URL.  

Instead of <PICTURE> and </PICTURE> you could perhaps make it such that
when mhonarc sees <MESG_HTML> and </MESG_HTML> it will allow everything
between the tags to be parsed as html and not preformatted text.  That is
when it sees the tags it adds </PRE> and <PRE> to the msg000XX.html file.
Just a thought.

I discourage this kind of modifications because MIME itself can
be used to do what you want.  For example, the following can be
done.

    To: foo(_at_)bar(_dot_)org
    From: joe(_at_)shmoe(_dot_)com
    Content-Type: multipart/mixed; boundary="boundary"

    --boundary
    Content-Type: text/plain

    Check out this cool picture.

    --boundary
    Context-Type: text/html

    <img src="coolimg.gif">

    --boundary--

This is the raw message.  Many modern MUAs will hide this from
you when creating a multipart message.

Or for simplicity, you can just make the whole message text/html
and not even deal with multipart.

        --ewh

<Prev in Thread] Current Thread [Next in Thread>
  • Re: Adding pictures in message, Earl Hood <=