public static  void sendEmail(String filename)
        {
            String title = "Price-Tax Price Report";
            string message = "hi all,\\n   Please check the Attachments";
            MailMessage mail = MSMail.Compose("发送的EMIAL号", "服务器", title, message, filename);
            
            MSMail.Send(mail);
    }public static MailMessage Compose(string To, string From, string Subject, string Content, string AttachmentFile)
{
MailMessage mail = new MailMessage();
mail.To = To;
mail.From = From;
mail.Subject = Subject;
mail.Body = Content;
if (AttachmentFile != null && File.Exists(AttachmentFile))
mail.Attachments.Add(new MailAttachment(AttachmentFile));

return mail;
}public static void Send(MailMessage mail) { string sMailServer = AppConfig.Settings["MSMail.Server"].Trim();
SmtpMail.SmtpServer = sMailServer;
//SmtpMail.SmtpServer = "172.20.15.95";
SmtpMail.Send(mail);
}文件存在而且不为空 一直会报错 说Invalid mail attachment 不明白 请高手帮忙 谢谢