> > All, > > Was hoping for some advise b/c I cannot seem to get this to work. > My problem is that it attaches the path name when I need to actual data > attached. So my goal is as if it would be > > cat test |uuencode test | mailx -s test [EMAIL PROTECTED] > > thanks, > > my $scratchtps = "/usr/local/log/filename"; > > code snippet < > there is a process that may/may not populate this file. > > > > > > if ( -s $scratchtps ) { > &mailme;
The above is usually better written as: mailme(); > } > > sub mailme { > my $msg = MIME::Lite->new( > From => 'EDM01 <[EMAIL PROTECTED]>', > To => 'Derek Smith <[EMAIL PROTECTED]>', > Subject => "Return EDM Tapes", > Type => 'TEXT', > Data => "$scratchtps", 'Data' is for the body, you need to either use the separate C<attach> method, or provide the filename as the 'Path' argument. You really should start reading the docs thoroughly, you have asked a number of questions that are pretty simple if you just pay attention to the API, and MIME::Lite has very thorough and simple documentation, http://search.cpan.org/~yves/MIME-Lite-3.01/lib/MIME/Lite.pm#Create_a_simple_message_containing_just_an_image > Disposition => 'attachment'); > $msg->send; > } > http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>