Sending emaill for more than 10 person at a time

Posted by Prince5 under ASP.NET on 2/16/2009 | Views : 1692 | Status : [Member] | Replies : 1
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




Responses

Posted by: Poster on: 2/16/2009 [Member] Starter

Up
0
Down
Just a guess, there might be reason that your SMTP server is assuming these as spam email and refusing to deliver.

See the SMTP log or bounce back email for more details.

Thanks

Prince5, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response