in reply to Re^2: Net:::SMTP and Attaching a xlsx
in thread Net:::SMTP and Attaching a xlsx

I am definitely open to using MIME::TOOLS although i have never used it before. Looking at it it looks like i should use the MIME::Decoder.

$decoder = new MIME::Decoder 'base64' or die "unsupported"; $decoder->encode(\*STDIN, \*STDOUT);

I have looked for an example on how use this due to not fully understanding the document. Do you by chance have an example that i could relate to the above scenario

Replies are listed 'Best First'.
Re^4: Net:::SMTP and Attaching a xlsx
by Anonymous Monk on Nov 21, 2015 at 07:37 UTC
Re^4: Net:::SMTP and Attaching a xlsx
by Anonymous Monk on Nov 21, 2015 at 07:47 UTC

    Thank you for pointing me in the right direction and helping make my first post here a learning experience. What i got to finally work for me was

    my $var; use MIME::Decoder; my $decoder = new MIME::Decoder 'base64' or die "unsupported"; open (my $fh, "<", $attachfile); open (my $STDOUT, '>', \$var); $decoder->encode($fh, $STDOUT); print $var; close $fh; close $STDOUT; $smtp->datasend($var);