peschkaj has asked for the wisdom of the Perl Monks concerning the following question:
I have written a program that logs into a variety of servers and executes a ps for a few different things. It then save the output in a file named File(timestamp).log, where the filename is stored as $filename
I've been trying to incorporate code to email me the file every morning (this will be run as a cron job), and I can't seem to incorpoate the filename.
Anwyay, here is the code I am using now:
jeremiah.peschka@qwest.com$msg = MIME::Lite->new( From =>'peschkaj@bsddev1.qwest.net', To =>'jeremiah.peschka@qwest.com', Subject =>'test message', Type =>'multipart/mixed'); $msg->attach( Type =>'TEXT', Data =>"Attached please find the attached attachment"); $msg->attach( Type =>'TEXT', Path =>'$fileName', Filename =>'AcLog.txt'; $msg->send;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Email and filenames
by earthboundmisfit (Chaplain) on Jul 05, 2001 at 20:29 UTC | |
by Abigail (Deacon) on Jul 06, 2001 at 02:59 UTC | |
|
Re: Email and filenames
by Beatnik (Parson) on Jul 05, 2001 at 20:30 UTC |