<html>
hi i am new to email application .
i have some of problem while sending attachments..
my doubts are:
1) how to send attachments in our local machine and
2) how to create datagrid like rediff inbox (datagrid having chek boxes and also having delete ,open and move to folder)..
here i am sending my code . but it is working to send only text data.
MailMessage mailMessage=new MailMessage();
mailMessage.From=txtFrom.Text;
mailMessage.To=txtTo.Text;
mailMessage.Subject=txtSubject.Text;
mailMessage.Body=txtContent.Text;
SmtpMail.SmtpServer="localhost";
SmtpMail.Send(mailMessage);
MailAttachment mailAttachment=new MailAttachment(@"d:\sreenu\UseCase.txt");
mailMessage.Attachments.Add(mailAttachment);
if(txtFile.PostedFile != null)
{
mailAttachment = new MailAttachment(@txtFile.PostedFile.FileName);
mailMessage.Attachments.Add(mailAttachment);
}
Response.Write ("Your Maill Has been sent Successfully......");
}
so, plz help me how to send attachments.
</html>
sreenu [ sreenivasu dot k ( at ) in dot ibm dot com ],
2005-07-29 02:12:45
#