• I also noticed you have this up there -erroraction silentlyContinue , is that by any chance also set for the entire script or is it in a try catch?  All of those commands should throw errors if there's a problem and as bruce said that file name doesn't look right but would throw an error if it's not being suppressed.

    Also why not just use the Send-MailMessage cmdlet?