You need to tell Outlook to use the attachment. At the moment you are just putting a path and filename into a variable. Sure that works fine but Outlook does not know it should attach the file to the e-mail. You need to add it to $mailitem like shown below.

 Code:
....
$MailItem.Attachments.Add("c:\somefolder\somefile.txt")
....
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.