Mail being sent through the SMTPClient class in the .NET framework is causing Outlook to put this mail in the junkmail folder.
Sending the exact same email (same subject, same body contents, same formatting, same sender/recipient, same SMTP Server, same transport method (POP3/SMTP) from outlook itself works fine. The email comes into outlook and is not marked as junk mail. The mail sent with the SMTPClient class however is flagged as junk.
The only difference I can find when this happens is the headers, which outlook seems to append some extra headers when mail is sent from there. Even trying to mimic them does not change the outcome of mail sent via SMTPClient.
I read on the system.net blog about how in .NET 4.0 there have been changes to address (some of) this, however I am running the most recent beta of VS2010 and .NET 4.0 and I get the exact same results.
Any thoughts?
Matt Kleinwaks - MSMVP MSDN Forums Moderator - www.zerosandtheone.com