in reply to Using MIME::Lite in perl.

I would suggest you to read the doc of MIME::Lite. But to get your code to work, I often send text/html-attached mails and never had a problem with:
my $msg = new MIME::Lite( From => $defaults{EMAIL_FROM}, To => $defaults{EMAIL_TO}, Subject => $defaults{EMAIL_SUBJECT}, Type => 'text/plain' ); $msg->attach( Type => 'text/html', Encoding => '8bit', Path => "$defaults{REPORT_DIR}$defaults{REPORT_FILE_N +AME}", ); MIME::Lite->send( 'smtp', 'localhost', Timeout => 20 ); my ($result) = $msg->send();


giant

Replies are listed 'Best First'.
Re: Re: Using MIME::Lite in perl.
by demerphq (Chancellor) on Jul 17, 2002 at 09:53 UTC
    Completely petty and insignificant, but
    Path => "$defaults{REPORT_DIR}$defaults{REPORT_FILE_NAME}",
    is better written (completely IMO) as
    Path => $defaults{REPORT_DIR}.$defaults{REPORT_FILE_NAME},
    :-)

    Yves / DeMerphq
    ---
    Writing a good benchmark isnt as easy as it might look.