try
{
MailMessage MyMessage = new MailMessage();
MyMessage.From = txtFrom.Text.Trim();
MyMessage.To = txtTo.Text.Trim();
MyMessage.Subject = txtSubject.Text.Trim();
MyMessage.Body = txtBody.Text.Trim();
MailAttachment mailAttachments2 = new MailAttachment(FileUpload1.PostedFile.FileName.ToString());
MyMessage.Attachments.Add(mailAttachments2);
SmtpMail.Send(MyMessage);
litStatus.Text = "Message Sent";
}
catch (Exception ex)
{
litStatus.Text = ex.ToString();
}
now this code works for sending email 10 person at a time with attachments to. bgut some times it get failed message is not delivered so what is the problem. shouls i confiure any smtp server in order to send email