in reply to Using MIME::Lite in perl.

i'm not an extensive user of MIME::Lite, but i have a couple of thoughts...
  1. Are you sure you understand what the Path & Filename parameters to attach are for? 'Path' should be the full path of your file, not just a directory name -- 'Filename' is just what label the file gets in the email.

    (I'm guessing this is your REAL problem, the rest are just alternate suggestions)

  2. In my experiments, MIME::Lite doesn't deal well with "multipart/mixed" msgs that only have 1 part, so unless you are attaching more things then you show you might try this...
    $msg = MIME::Lite->new( From =>'me@myhost.com', To =>'you@yourhost.com', Cc =>'some@other.com, some@more.com', Subject =>'Helloooooo, nurse!', Type =>'TEXT', Path =>'/your/file/name', );
  3. on my installation, MIME::Lite (v2.104) seems to be creating malformed msg headers -- putting in an extra blank line after the subject, if that's happening on your system, it's probably confusing your mail reader.
  4. you might wnat to take a look at the "ReadNow" option of $msg->attach, if there's a chance that your file is getting deleted at anypoint in your script (prior to the $msg->send() call)