[oak perl] MIME::Lite question

M. Lewis cajun at cajuninc.com
Wed Jun 1 21:42:39 PDT 2005


Thanks Michael. As David just gave me a new acronym.... NMD.

I've found through many google searches there is a module called
MIME::Lite::HTML. I've just begun trying this, but right now, it's not
working like I want. I've tried:

my $msg = new MIME::Lite::HTML
 From     => "$from",
To       => "$recipient",
Subject  => "$subject";

$msg = $msg->parse("$content");
$msg->send;


But all that really happens with this is it sends the filename as the
message rather than the html.

M

Michael Paoli wrote:
> There is MIME multipart/alternative.  Done well, though it still
> comparatively wastes space/bandwidth, it may be less egregious.
> But messing up MIME multipart/alternative tends to reflect rather poorly
> on the sender and/or their software (spammers and malware often
> intentionally misuse multipart/alternative, and some buggy software
> also messes it up horribly - these aberrant behaviors can be quite
> problematic/annoying for recipients).  Maybe someone on the list already
> knows if there are modules, etc., that are particularly useful for
> constructing MIME multipart/alternative.
> 
> http://www.faqs.org/rfcs/rfc2046.html
> 
> Quoting "M. Lewis" <cajun at cajuninc.com>:
> 
> 
>>NOTE: It has been pointed out to me (off-list) that most folks don't 
>>like HTML mail. I couldn't agree more. It's the person with the pointy 
>>little head that I'm sending this for who against everything I said, 
>>wants it done in HTML. Grrrrr...
>>
>>M
>>
>>M. Lewis wrote:
>>
>>>I'm trying to use MIME::Lite to send out a mailing. The mailing is an 
>>>HTML document ($content) with two images in it.
>>>
>>>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.
>>>
>>>Thanks,
>>>Mike
>>>
>>>
>>>$msg = MIME::Lite->new(
>>>     From     => "$from",
>>>     To       => "$recipient",
>>>     Subject  => "$subject",
>>>     Date     => `date`,
>>>     Type     => 'multipart/related',
>>>);
>>>
>>>$msg->attach(Type => 'text/html',
>>>Path => "$content");
> 
> 

-- 

  LISP: To call a spade a thpade.
  23:28:01 up 7 days,  5:45,  8 users,  load average: 0.00, 0.04, 0.06

  Linux Registered User #241685  http://counter.li.org



More information about the Oakland mailing list