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; |
Comments