Custom SMTP in C#

Introduction

This series of articles is written to show the user how to write TCP/ IP based client applications using C# on Microsoft's new .NET framework. This is the first article in this series.

The first killer applications on the Internet were email and netnews. Email on the Internet was developed using two simple Internet protocols, SMTP and POP3. The first two articles in this series, I'll present to you two classes for implementing SMTP and POP3 clients. In the third article in this series, I'll present to you one class for implementing a NNTP client. The SMTP or Simple Mail Transfer Protocol is described in RFC 821. This application protocols is used to send email over the Internet.

The .NET framework already contains an SMTP class in the System.Web.Mail namespace called SmtpMail. This class is sufficient for sending email over the Internet and I would not suggest that the class I'm presenting in this article is any better or worse. Let's just say that it is different. If you can get away with using the .NET SmtpMail class, then I suggest you do just that. The only advantage of my class is that it is open source and let me suggest that the SmtpMail class in .NET has a few more features. My motivation in writing this article is not to try and write a better SMTP class, but rather to show how to write TCP/ IP based clients in C#.

You might also like...

Comments

About the author

Randy Charles Morin

Randy Charles Morin Canada

Randy's article are Copyright 1998-2003 Randy Charles Morin

Interested in writing for us? Find out more.

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Debuggers don't remove bugs. They only show them in slow motion.”