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();
}
this is my code. i get the message "Message Sent"
but my mail is got stuck in C:\Inetpub\mailroot\Queue
where it get stuck up
now what is the problem is dere any configuration to be done in SMTP SERVER
I HAVE DONE ALL THE CONFIURATION IN SMTP SERVER BUT STILL THE PROBLEM EXITS