I have set up log4net in my C# 3.5 windows form application. I am looking for how to send email from a client pc with log4net. The SMTPAppender requires knowledge of SMTPHost and the examples I’ve seen are for web applications.
Is there a way to send email from an application that will work on any client’s computer that may or may not be in a domain or network. I guess I would also need to be able to check if there is a connection available.
I’ve searched for an answer but I don’t have much experience programming with email or the web to know what to look for. Any ideas to steer me in the right direction?
c# SmtpClient is quite right for your needs. here’s some sample code (host is an ip address or host name, and the port is usually 25, but not necessarily) :