promblem in sending email.

Posted by Prince5 under ASP.NET on 2/17/2009 | Views : 1278 | 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();
}
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




Responses

Posted by: Vuyiswamb on: 3/5/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Please Check this to get the Proper Steps

http://www.dotnetfunda.com/forums/thread387-how-to-make-mail-scipts-in-csharp.aspx?posted=1&notify=yes&com=added

Thank you for posting at Dotnetfunda
[Administrator]

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

Login to post response