Email Client

  • Thread starter Thread starter manoj
  • Start date Start date
M

manoj

hi,
we wrote a small email client which is working
sometimes and gives the following exception
System.Web.HttpException when it fails


The following is the code

using System;
using System.Windows.Forms;
using System.Web.Mail;

namespace email
{
class Class1
{
static void Main(string[] args)
{
MailMessage myMail = new
MailMessage();
myMail.From
= "(e-mail address removed)";
myMail.To
= "(e-mail address removed)";
myMail.Subject = "test mesg";
myMail.BodyFormat =
MailFormat.Text;
myMail.Body = "test mesg";
SmtpMail.SmtpServer
= "192.168.36.200";
SmtpMail.Send(myMail);
}
}
}
 
manoj, some questions that would help to have answers to:

1. What line does it fail on?
2. What is the rest of the error?
3. Are you sure the SMTP server is always available?
4. Under what conditions does the exception occur, load, normal use, etc.
 
Back
Top