SMTP Mailing Application

Getting Started

Using this knowledge, we can quickly create a mail application in a Window Form.  First we create a Windows Form Application by going to the New->Project Menu:

Figure 2 - Creating the Windows Application in the IDE

In order to set up your application to run SmtpMail, you need to add a reference by right clicking on the namespace in the solution explorer->Add Reference.

Figure 3 - Adding a Reference to your Application from the Solution Explorer

 and then choosing System.Web.dll in the Add Reference dialog:

Figure 4 - Using the Add Reference Dialog

We also need to add the using statements in our application for the mail components:

Listing 1 - using statements for web mail

using System.Web;
using
System.Web.Mail;

You might also like...

Comments

About the author

Mike Gold United States

Mike Gold is President of Microgold Software Inc. and Creator of WithClass 2000 a UML Design Tool for C#. In the last few years Mike has consulted for companies such as Merrill Lynch and Chase M...

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.

“Perl - The only language that looks the same before and after RSA encryption.” - Keith Bostic