hi. I am sending attachments and for some reason the files are getting
corrupted and a different size than the original file. I am sending word and
excel documents.
below is the code I am using
MailMessage Message = new MailMessage();
MailAttachment att = new
MailAttachment( Server.MapPath( ".")+ \\sample.doc);
Message.To = a@b.com;
Message.From = a@b.com;
Message.Subject = "Mail from asp.net";
Message.Attachm ents.Add(att);
try
{
SmtpMail.SmtpSe rver = "my.mailserver. com";
SmtpMail.Send(M essage);
}
catch(System.We b.HttpException ehttp)
{
this.Response.W rite(ehttp.ToSt ring());
}
any help is very welcome.
Tnx,
Alejandro.