in reply to Re^2: Sending email with attachments using Email::Mime
in thread Sending email with attachments using Email::Mime

Ok, we are almost there, you need again a module and a very light change. I tried not to change your code too much just to get it work on my machine.
You need to change, actually add one line to this part:
use IO::All; # install this module first push @parts, Email::MIME->create( attributes => { filename => $attachments{doc_name}, content_type => $attachments{doc_mime_type}, disposition => 'attachment', encoding => 'base64', name => $attachments{doc_name} }, body => io($attachments{doc_name})->all, # add this line );
For the illegal seek error, just delete these lines, you don't need them:
#print "error1 $!\n"; #print "error2 $Mail::Sendmail::error\n";
Cheers, have fun!

Replies are listed 'Best First'.
Re^4: Sending email with attachments using Email::Mime
by gezb (Novice) on May 15, 2014 at 09:47 UTC

    Thats great, all working now. Thanks for your help and advice. This is why I love Perl !!