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

No; you're avoiding mime::tools while trying to get someone to explain what/how it does -- why dance around the knowledge you say you want? Use mimetools and see what it does, look at the source to see how

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

    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

      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);