A
Alejandro Penate-Diaz
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 = (e-mail address removed);
Message.From = (e-mail address removed);
Message.Subject = "Mail from asp.net";
Message.Attachments.Add(att);
try
{
SmtpMail.SmtpServer = "my.mailserver.com";
SmtpMail.Send(Message);
}
catch(System.Web.HttpException ehttp)
{
this.Response.Write(ehttp.ToString());
}
any help is very welcome.
Tnx,
Alejandro.
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 = (e-mail address removed);
Message.From = (e-mail address removed);
Message.Subject = "Mail from asp.net";
Message.Attachments.Add(att);
try
{
SmtpMail.SmtpServer = "my.mailserver.com";
SmtpMail.Send(Message);
}
catch(System.Web.HttpException ehttp)
{
this.Response.Write(ehttp.ToString());
}
any help is very welcome.
Tnx,
Alejandro.