[oak perl] MIME::Lite question

Adrien Lamothe alamozzz at yahoo.com
Thu Jun 2 20:02:35 PDT 2005


It sounds like the problem is the html is referencing
the images as local files, whereas the message
recipients need a URL in the <img> tag in order to see
the images. So, instead of <img src="image.jpg">, you
would want to use <img src="URL/image.jpg">.

Eli hints that there may be a way to cause the image
to be embedded into the html, his code example uses
<img src="cid:our-image-content-id"/>. Is this true,
Eli? The one time I helped send a mass advertising
email (to interested customers,) I used an external
URL reference to the images.

- Adrien


--- "M. Lewis" <cajun at cajuninc.com> wrote:

> Hi Eli. Thanks for the reply.
> 
> I knew when I said the images did not appear, that
> it wasn't very clear. 
> Allow me to try again. The HTML page was sent. Where
> the images were 
> supposed to appear, there was a 'hole' the size of
> the image with a 
> broken link icon in it.
> 
> I have since solved this issue and will do a follow
> up to this list tonight.
> 
> Thanks,
> Mike
> 
> 
> Eli the Bearded wrote:
> > Mike Lewis <cajun at cajuninc.com> wrote:
> > 
> >>The message is being sent as HTML, however the two
> images do not appear.
> >>I've tried adding other attachments for the two
> images, but that just 
> >>makes them appear as attachments (duh..) rather
> than in the HTML
> >>document.
> >>
> >>Obviously I have missed the boat here somewhere.
> Suggestions welcome.
> > 
> > 
> > A mere "does not appear" doesn't really help. Are
> the images not in
> > the MIME output at all? Or is it that the HTML
> portion does not find
> > the images?
> > 
> > I come from this as someone who has very little
> experience using MIME
> > generators (and none with MIME::Lite), but a fair
> amount of MIME
> > parsing experience. I don't know how to do what
> you want with that
> > module, and I don't know if there is a better one.
> I *do* know what
> > the MIME output should look like.
> > 
> >   Normal: mail
> >   Headers: and such
> >   MIME-Version: 1.0 (flag that this is a MIME
> message)
> >   Content-Type: multipart/related (these things go
> together);
> > 	boundary="-->8--cut-here--"
> > 
> >   This is the message preamble. Only non-MIME
> readers get to see this.
> > 
> >   ---->8--cut-here--
> >   Content-Type: text/html; charset="us-ascii"
> (always set your charset)
> >   
> >   <html><head><title>You've Got
> MIME!</title></head>
> >   <body><h1>You've Got MIME!</h1>
> >   <p>An image here:
> >   <img src="cid:our-image-content-id" alt="arrow"
> width=42 height=29 />
> >   </p>
> >   </body>
> >   </html>
> > 
> >   ---->8--cut-here--
> >   Content-Type: image/gif; name="arrow.gif" (name
> is optional)
> >   Content-Disposition: inline;
> filename="arrow.gif" (can't remember if
> > 	this header is needed or not) 
> >   Content-ID: <our-image-content-id>
> >   Content-Transfer-Encoding: base64
> > 
> >  
>
R0lGODdhKgAdAIAAAAAAAP///ywAAAAAKgAdAAACK4yPqcvtD6OctNqL
> >   s968+w+G4kiWBwCYCKqeqYLGItsmdI3n+s73/g8MYgoAOw==
> > 
> >   ---->8--cut-here----
> > 
> >   This is the message epilogue. Non-MIME readers
> can see this, but they
> >   probably have given up by now.
> > 
> > I just whipped that up by hand, so it might have a
> mistake or two in it.
> > Important, though, are the URI format used in the
> <IMG> tag, and the
> > matching content-ID on the appropriate related
> part.
> > 
> > Note that it is perfectly legit to do
> multipart/alternative with a
> > plain text part and a multipart/related
> alternative. MIME allows
> > plenty of recursion, just like RFC-822 (comments
> (allow (recusion))).
> > Such nesting might be beyond the scope of a module
> named "Lite"
> > however. Be nice to your readers and follow the
> guideline of sorting
> > parts so the plainest stuff comes first. It irks
> me to get alternative
> > messages with the html first and the plaintext
> last.
> > 
> > Elijah
> > _______________________________________________
> > Oakland mailing list
> > Oakland at pm.org
> > http://mail.pm.org/mailman/listinfo/oakland
> > 
> 
> -- 
> 
>   IBM: It's Become Monolithic
>   18:48:01 up 8 days,  1:05,  6 users,  load
> average: 0.43, 0.89, 1.15
> 
>   Linux Registered User #241685 
> http://counter.li.org
> _______________________________________________
> Oakland mailing list
> Oakland at pm.org
> http://mail.pm.org/mailman/listinfo/oakland
> 


Adrien Lamothe
www.adriensweb.com


		
__________________________________ 
Discover Yahoo! 
Have fun online with music videos, cool games, IM and more. Check it out! 
http://discover.yahoo.com/online.html


More information about the Oakland mailing list