Email Client

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);
}
}
}
 
G

Greg Ewing [MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top