> The error message regarding relaying would seem to indicate a mail > server setup problem rather than an issue connecting with the server. > Are you sure that your local server is setup to allow relaying for the > domains of the email address your are sending from (i.e. pretending to > be). Actually, my knowledge about configuring of smtp server is rather limited, but I'll try to find something on newsgroups, dedidcated to it.
> > The main issue with the System.Web.Mail library is that the SmtpHost > property is global. If the application sets the SmtpHost independent of > log4net then log4net should not reset it unless told to use a specific > value. log4net treats the empty string as unset and therefore does not > overwrite the global value of the SmtpHost. But the scenario I presented, describes the situation, when log4net is the only client of Smtp Mail and despite it the error occurs. If log4net uses SmtpMail, then shouldn't it act according to requirements of this class, i.e. to treat empty string (and even null string) as legal value of SmtpMail.SmtpServer property ? Because nowadays we have the situation, when SmtpAppender informs us (via internal log file), that it sets its SmtpHost property to empty string and despite it doesn't use it. It is inconsistency, in my opinion. On other hand, you can't send e-mail with empty recipient field, but I can't see anything analyzing the m_to appender variable, set thruogh config file as well. > If you need a different behaviour then you can just subclass the > SmtpAppender and override the ActivateOptions method to set the SmtpHost > property. I've done it already, but I've been thinking, that SmtpAppender behaviour is erronoeus. -- Tomek
