sharktooth has asked for the wisdom of the Perl Monks concerning the following question:

I think I know what I will get in response to this question (a lot of the "Use MIME::Lite" answers), but I'll try anyway.

I am trying to create inline images in an HTML E-Mail. The problem I am having is that some E-Mail recipients can view the image (Novell's Groupwise), while others cannot (Netscape and Mozilla). The HTML is displayed perfectly, as is the text in proper MIME text-only clients.

The image section fully decodes (using MIME::Base64) and becomes a perfect image. Boundaries are dynamically generated and are unique (surrounding each neccesary piece of the message). Text is first, making the message fully compliant with RFC 1521, with the html portion containing an additional unique boundary that separates the html from the image, and all of the proper Content Type headings.So, what could possibily be wrong? I am using img src='cid:' tags. Any idea's?

joe

Replies are listed 'Best First'.
Re: Inline Images in Email
by guha (Priest) on Oct 01, 2002 at 18:17 UTC

    I think you will find an example to test in Mail::Sender written by our fellow monk Jenda

    HTH

Re: Inline Images in Email
by adrianh (Chancellor) on Oct 01, 2002 at 17:52 UTC

    Some code and sample output would help :-)

    Could be a bug in the Netscape/Mozilla version you're using... version numbers?

    You might also want to double check that the HTML is valid. I've known this to cause problems.

      I am using Mozilla 1.0, Netscape 4.76, and Netscape 6.2, all with the same effect. The primary example is (of course, with the majority of the image removed) :

      From: "Automated Mailing" <joe@sharktooth.org> Subject: A Few Good Laughs To: <joe@relia.net> Content-Type: multipart/alternative; boundary="------------D76B058AC74 +857EF852E2F4E" Date: September 27, 2002, 01:12.02 CGIUtility: /usr/local/www/random_data/ofTheDay.pl --------------D76B058AC74857EF852E2F4E Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit The Sharktooth System A Few Good Laugh +s The concept is interesting and well-formed, but in order to earn better than a 'C,' the idea must be feasible. -- A Yale University management professor in response to Fred Smith's (founder of FedEx) paper proposing reliable overnight delivery service _________________________________________________________________ A 60 year-old couple was celebrating their 40 years of marriage. During the celebration a fairy appeared! "Because you have been suc +h a loving couple all those years, I would like to give you each one wish." The wife quickly chimed in, "I want to travel around the world." Th +e fairy waved her wand and, POOF! She had the tickets in her hand. Next, it was the husband's turn. He paused for a moment, then said shyly, "Well, I'd like to have a wife 30 years younger than me." Th +e fairy picked up her wand and, POOF! He was 90... _________________________________________________________________ --------------D76B058AC74857EF852E2F4E Content-Type: multipart/related; boundary="------------3817FA6AEF0279D1D9D69686" --------------3817FA6AEF0279D1D9D69686 Content-Type: text/html <html> <table cellpadding='2' border='0' cellspacing='0' width='100%' height= +'100%'> <tr> <td bgcolor='006688' align='right'> <table cellpadding='2' border='0' cellspacing='0' width='100%' h +eight='100%'> <tr bgcolor='BBE0FF'> <td nowrap> <img src='cid:DBD60CB6B33CCD0C835C452A.images.logo.gif' al +t='[logo image missing]'> </td> </tr> </table> </td> <td valign='middle' align='right' width='100%'><b>A Few Good Laugh +s</b></td> </tr> <tr> <td colspan='2' width='100%' bgcolor='006688' align='right'> <table cellpadding='2' border='0' cellspacing='0' width='100%' h +eight='100%'> <tr bgcolor='BBE0FF'><td> <center> <i>The concept is interesting and well-formed, but in order to earn be +tter than a 'C,' the idea must be feasible.<br> <br> -- A Yale University management professor in response to Fred Smith's +(founder of FedEx) paper proposing reliable overnight de livery service</i> </center> </td></tr> </table> </td> </tr> <tr><td colspan='2'><hr></td></tr> <tr> <td width='100%' bgcolor='006688' align='right' colspan='2'> <table cellpadding='2' border='0' cellspacing='0' width='100%' h +eight='100%'> <tr bgcolor='BBE0FF'><td> A 60 year-old couple was celebrating their 40 years of marriage. During the celebration a fairy appeared! "Because you have been such a loving couple all those years, I would like to give you each one wish."<br> <br> The wife quickly chimed in, "I want to travel around the world."<br> <br> The fairy waved her wand and, POOF! She had the tickets in her hand. Next, it was the husband's turn. He paused for a moment, then said shyly, "Well, I'd like to have a wife 30 years younger than me."<br> <br> The fairy picked up her wand and, POOF! He was 90... </td></tr> </table> </td> </tr> </table> <hr> </html> --------------3817FA6AEF0279D1D9D69686 Content-Type: image/gif; name="/images/logo.gif" Content-Transfer-Encoding: base64 Content-ID: <DBD60CB6B33CCD0C835C452A.images.logo.gif> Content-Disposition: inline; filename="/images/logo.gif" R0lGODlhJQAzAOcAAAAAAIAAAACAAICAAAAAgIAAgACAgMDAwMDcwKbK8AgICDAwMFBQUF +hYWGRk ZJiYmIiAgHBoaGhgYGBYWFhQUFBISEhAQEA4OJhkZGQwMJgwMDAAAGQAAJgAAEg4MEAwKD +goIJgw ............ qKMwqBDjeZPaCAMEDGCaKQ0urFCBp42O6YIEpJZKgwqMTjokCg0NuCpnrLIO9ACtNAYEAD +s= --------------3817FA6AEF0279D1D9D69686-- --------------D76B058AC74857EF852E2F4E--
Re: Inline Images in Email
by joe++ (Friar) on Oct 01, 2002 at 19:05 UTC
    Hmm, remember doing just that all by hand, only specifying the attachment as "Content-disposition: inline". Worked great with Netscape.

    Sorry, no code at hand right now, maybe later is helpful?

    --
    Cheers, Joe