logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Grabowski <rongrabow...@yahoo.com>
Subject RE: LOG4NET - SMTP Appender Not Working
Date Wed, 28 Sep 2005 19:27:12 GMT
Did you configure log4net with ConfigureAndWatch or just Configure?

The built-in System.Web.Mail.SmtpServer.Send method has a void return
type. Unless I'm mistaken, it does not record its interactions with the
mail server. OpenSMTP probably supports this. I know the AspNetEmail
email component does:


If you're paranoid about mail not being sent, you should probably
invest in a component that has logging:

 EmailMessage msg = new EmailMessage("Mail1.MyCompany.com");
 msg.FromAddress = "me@MyCompany.com";
 msg.AddTo("you@YourCompany.com", "Billy Bob");
 msg.Subject = "Daily Newsletter";
 msg.Body = "Here is our daily newsletter.....";
 msg.Logging = true;
 if (msg.Send() == false)
   LogLog.Error(String.Format("Unable to send mail. Log: {0}",
    msg.GetLog()), msg.LastException());

--- Richman Michael <michaelr@mcm.com> wrote:

> I've noticed that one one of our servers, an appender might not work
> until we change the config file.
> I've noticed this on the smtp appender, and it doesn't fail
> consistenly one one buffer size, it stops working sometimes, and any
> change to the config file, including to the bufferSize seems to reset
> something.
> Michael

View raw message