attachment email script problem

S

Shawn

Hi,

We have been using the below script to auto email some reports from UNIX to
a management group.
Its been in place for sometime and luckily for me it hasn't needed any
maintenance.

The 1st section would include that particular report as the body of the
email and the other 2 reports as attachments.
It goes to people who are on PCs and NCD Unix terminals. Within the past
week the 1st report which had been the
body of the email turned into a 3rd attachment on the email and there was no
longer a body to the email for the PC
users only. The people who were on the NCD terminals didn't notice a change
and received the email as normal.

After a short discussion with the system admin, he suggested maybe the
encoding of the email was be manipulated to strip
the body of the email. This is where I get in over my head. Because I can
send the email manually through my NCD
with the exact attachments, recipients, etc and it is received as it
normally was with the 1st report in the body of the email.
I'm guessing that maybe I need to change some of the setting in the script
like the type, or encoding to correct the problem.
But, just am not sure what to do??? Any suggestions would be greatly
appreciated! Thanks!


#!/usr/local/bin/perl5.6
use lib "lib";
use MIME::Lite;
$msg = new MIME::Lite
From => '(e-mail address removed)',
To => (join',','(e-mail address removed)','(e-mail address removed)'),
Cc => '(e-mail address removed)'),
Subject => 'PNP Daily Gain/Loss Results',
Type => 'TEXT',
Path =>
"/home/pnp/gp22/SCRIPTS_regular/gainloss/reports/GP22_all_pwgl_rept.txt ",
Encoding => '7bit';
attach $msg
Type => 'TEXT',
Path
=>"/home/pnp/gp22/SCRIPTS_regular/gainloss/reports/GP22_pwgl_user_rept.txt",
Filename =>"GP22_pwgl_user_rept.txt";
attach $msg
Type => 'TEXT',
Path
=>"/home/pnp/gp22/SCRIPTS_regular/gainloss/reports/pnp_readme.txt",
Filename =>"pnp_readme.txt";
$msg->send;
exit 0;
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top