Software development, .Net, SQL Server, TDD, Agile, Community and other Odds and Sods
Mitch Wheat has been working as a professional programmer since 1984, graduating with a honours degree in Mathematics from Warwick University, UK in 1986. He moved to Perth in 1995, having worked in software houses in London and Rotterdam. He has worked in the areas of mining, electronics, research, defence, financial, GIS, telecommunications, engineering, and information management. Mitch has worked mainly with Microsoft technologies (since Windows version 3.0) but has also used UNIX. He holds the following Microsoft certifications: MCPD (Web and Windows) using C# and SQL Server MCITP (Admin and Developer). His preferred development environment is C#, .Net Framework and SQL Server. Mitch has worked as an independent consultant for the last 10 years, and is currently involved with helping teams improve their Software Development Life Cycle. His areas of special interest lie in performance tuning
Thursday, February 22, 2007
.NET SMTP Email
On several occasions, when working with SMTP email in .NET, I’ve wasted a few hours for a variety of reasons relating to firewalls, virus scanners, relay only from domain addresses and plain stupidity (pointing at the wrong server for instance), to name just a few.
Recently, a colleague fell victim to one such annoying problem. We both went through the list of usual suspects, trying everything we could think of, until we reached the ‘this is crazy!” point.
The Solution: If you’re running a later version of Mcaffee virus protection, you might want to turn off the default behaviour of blocking any outbound traffic port 25!
I’m tempted to mention the maxim of Sherlock Holmes:
“How often have I said to you that when you have eliminated the impossible,
There is a useful FAQ for the 2.0 .NET Framework’s System.Net.Mail namespace at System.Net.Mail covering a range of common and advanced scenarios (and a corresponding one for 1.1 here).
MSN, Email: mitch døt wheat at gmail.com