Hey,
I've got a windows service that sends mails to users. The code that is used, is the basic way for sending mail.
SmtpClient client = new SmtpClient("servername");
MailMessage msg = new Mailmsg(); ...// configuration
client.send(msg);
If I set the credentials from client , i can send a mail through the Exchange server (2007). The exchange server is configured to allow to send emails without authentication(anonymously).
So if I dont provide credentials with usedefaultcredentials on false, it works in my console application, but not in my windows service.
I get the message "the smtp server requires a secure connection or the client was not authenticated". Anyone an idea why I get this when I use a windows service , instead of a console app (identical code)