MIME::Lite or /bin/mail help please

Discussion in 'Perl Misc' started by Billy Patton, Nov 2, 2007.

  1. Billy Patton

    Billy Patton Guest

    I'm trying to get a weekly to be mailed through a cron job.
    I have a perl scripts that creates an excel spread sheet.
    I want to attach this spread sheet to some mail and send to my group as
    my weekly report.

    I cat find where I can do an attachment through /bin/mail do Ive tried
    MIME::Lite.

    What the code does now is that it will make the attachment and send
    it,but when it gets there it is empty.

    Here's what I have so far:
    #!/usr/local/bin/perl

    use strict;
    use warnings;
    use MIME::Lite;
    require "ctime.pl";

    my $date = ctime ( time );
    my $file = '/home/bpatton/c014.report.xls';
    chomp $date;
    my $msg = MIME::Lite->new(
    From => '' ,
    To => '' ,
    Subject => "Weekly from Billy Patton $date",
    Type => 'multipart/mixed',
    );
    $msg->attach(Type => 'TEXT' ,
    Data => "See attachment or look at $file" ,
    );
    $msg->attach(Type => 'AUTO' ,
    Filename => $file,
    Path => '/home/bpatton',
    Disposition => 'attachment' ,
    );
    $msg->send;
     
    Billy Patton, Nov 2, 2007
    #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. John B. Kim

    MIME::Lite HTML message handling

    John B. Kim, Jan 18, 2004, in forum: Perl
    Replies:
    1
    Views:
    1,707
    Joe Smith
    Jan 19, 2004
  2. Zev Steinhardt

    Perl Mime::Lite question. Help please?

    Zev Steinhardt, Aug 24, 2004, in forum: Perl
    Replies:
    1
    Views:
    753
    dan baker
    Sep 1, 2004
  3. Aaron Brady

    SQL, lite lite lite

    Aaron Brady, Dec 29, 2008, in forum: Python
    Replies:
    15
    Views:
    761
    Aaron Brady
    Jan 1, 2009
  4. anne001
    Replies:
    1
    Views:
    478
  5. Replies:
    0
    Views:
    83
Loading...

Share This Page