Sending e-mail programaticaly

  • Thread starter Thread starter Ron Harter
  • Start date Start date
R

Ron Harter

I am developing a C# windows application that will allow a user to send an
e-mail to an SMS server when events happen in the system. I was going to use
System.Web.Mail namespace and use the smtpmail class to compose and send the
mail.

The application is a windows based application and when I build the
application I get an error on the using System.Web.Mail line.

Does the application have to be run on a server? I am working on XP
Professional system.

Are there additional ways to send e-mail programmatically in .Net? Any
advice or information is greatly appreciated.
 
Personally, I have never liked the idiosyncracies of System.Web.Mail which
wraps CDO.SYS "under the hood".

Fortunately, there are a number of open source or freeware SMPT mail
packages for .NET, in 100% managed code.
Try looking in the user samples at gotdotnet.com, or you might want to look
at Quiksoft's "freesmtp", for another.
Peter
 
The (compile time) error you are getting just means that you have to add a
reference to System.Web.dll to your project before you can use the
System.Web.Mail namespace.

You may or may not like System.Web.Mail but in most cases it works fine if
you can live with the fact that it is indeed just a wrapper around CDO.

HTH, Jakob.
 
Back
Top