Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: MIME Lite HTML with Attachments

by snax (Hermit)
on Sep 05, 2003 at 23:22 UTC ( [id://289384]=note: print w/replies, xml ) Need Help??


in reply to MIME Lite HTML with Attachments

Your errors tell part of the story, and it looks like you know better, too :)

You have

$mailHTML::MIME::Lite->attach( Type =>'text/html; charset="iso-8859-1" +', Data => '<b>Brought to you now!</b>', );
which should be
$mailHTML->attach( Type =>'text/html; charset="iso-8859-1"', Data => '<b>Brought to you now!</b>', );
precisely for the same reasons you used it as
my $MIMEmail = $mailHTML->parse("$URL");
towards the end of your script. The token (is that the right word?) $mailHTML has all the methods "embedded" -- you don't need to try to specify which parts of which inherited interfaces you want to play with; it has them "natively" so to speak.

This presupposes that the ::Lite extension does properly inherit, of course.

Replies are listed 'Best First'.
Re: Re: MIME Lite HTML with Attachments
by knexus (Hermit) on Sep 06, 2003 at 00:15 UTC
    I agree the errors usually tell the story but for some reason the message hasn't been getting thru to me :)
    Also, If I appear to know better, please don't let it fool you, I am new to perl (couple of weeks or so) but have worked in several other langs... sometimes I think that may actually be baggage for me ;-)

    Anyhow, I had already tried the approach you mentioned, seemed natual. However, I got the following error:

    $mailHTML->attach( Type =>'text/html; charset="iso-8859-1"', Data => '<b>Brought to you now!</b>', ); Can't locate object method "attach" via package "MIME::Lite::HTML" at +mailhml.pl line 15.

    So that's when I tried "scoping" the reference (terminology???) to get at the method I want.

    Perhaps, your statement

    This presupposes that the ::Lite extension does properly inherit, of course.

    I guess I will go peruse the source. Any other thoughts?

    Thanks

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://289384]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-19 01:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found