The Joel on Software Discussion Group (CLOSED)

A place to discuss Joel on Software. Now closed.

This community works best when people use their real names. Please register for a free account.

Other Groups:
Joel on Software
Business of Software
Design of Software (CLOSED)
.NET Questions (CLOSED)
Fog Creek Copilot

The Old Forum

Your hosts:
Albert D. Kallal
Li-Fan Chen
Stephen Jones

Send email from ASP.NET

Hello, I've been sending email from using the built-in system.web namespace.  Lately, I've found more and more mail servers rejecting the email as spam, or delaying delivery.  I've ran some checks to confirm that I'm not on a blacklist, have reverse DNS lookup, etc.  I suspect the could be resolved by sending authenticated email instead of anonymous.  Does anyone here send a lot of email through without these problems?  Care to share what components you're using, or how you're doing it?

Saturday, February 04, 2006
You could try the System.Net.Mail namespace that comes with the .NET Framework 2.0. It replaces the System.Web.Mail namespace of the .NET Framework 1.0/1.1.

The System.Net.Mail namespace gives you more control of the makeup of the email message and communication with the SMTP server, which might resolve your issues.
Mike Green Send private email
Saturday, February 04, 2006
If you just want to know how to send authenticated email and want to continue to use the System.Web.Mail namespace, then this article might help:

It does require at least the .NET Framework 1.1 though.
Mike Green Send private email
Saturday, February 04, 2006
Forgive me if I'm being master-of-the-obvious, but make sure that you're pointing to your real SMTP server and not an SMTP  server running on the local webserver.  Most servers at least do a lookup to make sure that mail from domain is comming from's mailserver.
Saturday, February 04, 2006
Thanks all.  The link to information about sending authenticated email helped.  It wasn't available in the same way for .net 1.0 as it is in .net 1.1.  The emails are working fine for my test cases now.  Thanks!

Saturday, February 04, 2006
I'm glad the article was useful. There is now a new article up with free sample code. It should be useful if you ever need to re-do the authentication using the .NET Framework 2.0 and the System.Net.Mail namespace.

The two articles are now:

Using the .NET Framework 1.1 and the System.Web.Mail namespace:

Using the .NET Framework 2.0 and the System.Net.Mail namespace:
Mike Green Send private email
Wednesday, February 08, 2006

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz