Hi:

I am running ActiveState Perl version 5.6.0 on Windows NT 4.0 box (I
know, I know, but they didn't ask my opinion).  What I'd like to do is
send the MIME file I've created with:

sub EmailFile {
                            print "Sending Excel file to users...\n";

                            my $top = build MIME::Entity Type =>
"multipart/mixed",

-From => "LOAN Alert",

-To => "loan maturity",

-cc => "anyuser",

-Subject => "Maturity Alert";


attach $top Path => $filedate,

Type => "application/xls",

Encoding => "base64",

Disposition => "attachment";
                        }

using Net::SMTP.  I'm a little lost.  I new to Perl but I know this can
be done (right?).

I have tried:

    $smtp->mail($ENV{USER});
    $smtp->to('henryf');
    $smtp->data();
    $smtp->datasend($filedate);
    $smtp->dataend();
    $smtp->quit;
This seems to send the string representing the fully qualified file name
as the message.

Would someone be kind enough to point me to the documentation that would
answer my question?  I've looked at 'perldoc Net::SMTP', but I'd like to
see some more on the data/datasend functionality.

Thank you for reading this,
Francis

Reply via email to