attachment email script problem

Discussion in 'Perl Misc' started by Shawn, Feb 6, 2004.

  1. Shawn

    Shawn Guest

    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 => '',
    To => (join',','',''),
    Cc => ''),
    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;
    }
     
    Shawn, Feb 6, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alan Harris-Reid

    Email attachment problem

    Alan Harris-Reid, Apr 29, 2010, in forum: Python
    Replies:
    0
    Views:
    279
    Alan Harris-Reid
    Apr 29, 2010
  2. Alan Harris-Reid

    Binary file email attachment problem

    Alan Harris-Reid, May 10, 2010, in forum: Python
    Replies:
    0
    Views:
    409
    Alan Harris-Reid
    May 10, 2010
  3. Replies:
    1
    Views:
    284
    Ray Costanzo [MVP]
    Nov 28, 2004
  4. ecureuil
    Replies:
    0
    Views:
    357
    ecureuil
    May 28, 2006
  5. Paul Moore
    Replies:
    5
    Views:
    124
    Paul Moore
    Jun 4, 2007
Loading...

Share This Page