in reply to Re: MIME::LITE - Body contents and attachments
in thread MIME::LITE - Body contents and attachments
Based upon your coment, i'm pretty sure that you were driving at print() and/or print_body(). Unfortunatly, I was not able to get those to work(lack of knowledge). I tried a combination of using Path, FH, readnow, with no success. However, I was able to use data by cat'ing the file to a variable.
If you would be so kind to possible disclose on how you would have gotten it to work with print() or print_body(), or what ever other means you were driving at, I would appreciate it.
Thanks
Gary
#################################################### #### Emailing the Reports now #################################################### # Send An Email with Attachment $data = `${uxutil}cat ${OutFile}`; #print "Below is the contents of \$data\n$data\n"; MIME::Lite->send('smtp',"$Email_Server",Timeout=>60); $msg = MIME::Lite->new( From => 'Netbackup@company.net', To => "$Email_List", Subject => "${hostname} Robotic Tape Information", Type => 'multipart/mixed'); $msg->attach(Type => 'application/vnd.ms-word', Filename => `basename \"${OutFile}\"`, Path => "$OutFile", ReadNow => 1, Disposition => 'attachment'); $msg->attach(Type => "text/plain", Encoding => 'base64', Data => $data); $msg->send(); #################################################### #### End Emailing the Reports ####################################################
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: MIME::LITE - Body contents and attachments
by chargrill (Parson) on Apr 19, 2006 at 16:55 UTC |