ASP.NET
  Home arrow ASP.NET arrow Sending Mail with the ASP.NET Web Matrix
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

Sending Mail with the ASP.NET Web Matrix
By: Dan Wellman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 8
    2005-12-12

    Table of Contents:
  • Sending Mail with the ASP.NET Web Matrix
  • Creating the Page
  • Testing the Page
  • Adding Enhancements

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Sending Mail with the ASP.NET Web Matrix


    (Page 1 of 4 )

    The MS ASP.NET Web Matrix application has a number of code wizards, covered in previous articles. This one covers the EMAIL message code generator. It is surprisingly useful for adding contact page functionality to a website; your visitors will appreciate being able to interact with you in this manner. Dan Wellman explains how to set it up.

    The previous articles looked at the built-in code wizards that come with the MS ASP.NET Web Matrix application.  (You can find the most recent of these articles here). These code generators are included to make performing basic database operations with ASP.NET extremely easy to do and can simplify the learning process or cut down on design time.  We’ve covered all four of the basic database operations in the previous four articles, but there remains one code wizard that has not yet been used: the EMAIL message code generator. 

    Many websites feature a contact page that will let a user enter a message into the page and then have the application send the email to the address specified in the email function parameters.  This may be for technical support, help and advice, or to request information.  Whatever the reason, the ASP.NET Web Matrix makes adding this functionality to a site extremely easy, and is exactly what we’re going to do.

    For conclusive testing of this feature, you are going to need to have and use IIS (5.1 ideally).  If you have Norton, or another application able to scan all email for viruses, you will know it has worked when you get a popup advising that the mail is being scanned, but to be able to receive an email in your domain and view it, IIS is required.

    This part is simple, so let’s get it out of the way first; open IIS, expand the Default SMTP Virtual Server and select Domains.  There should be a default domain already set up, but you can create a new one for the purpose of this article by right-clicking anywhere in the right-hand pane of IIS and selecting New > Domain. 

     

    This action will generate an instance of the New SMTP Domain wizard.  Set the radio to Alias and then click Next.  Choose a name for your domain, dudemail.com will be sufficient, and click Finish.  Your domain will now appear in the domain list of IIS.  That is it.  All incoming mail for this domain will be stored in a folder called Drop, which resides in the mailroot folder of Inetpub.

    More ASP.NET Articles
    More By Dan Wellman


       · Hi everyone,This article shows how easy it is to add email functionality to an...
     

    ASP.NET ARTICLES

    - Disadvantages of the ASP.NET MVC Framework
    - Advantages of the ASP.NET MVC Approach
    - ASP.NET Web Forms Weaknesses
    - ASP.NET Web Forms Meets ASP.NET MVC
    - Source Code for Saving and Retrieving Data w...
    - Using GridView to Save and Retrieve Data wit...
    - Handling Dynamic Images in ASP.NET 3.5 AJAX ...
    - Retrieving Data with AJAX and the GridView C...
    - Playing with Images in ASP.NET 3.5 AJAX Appl...
    - Saving and Retrieving Data with AJAX
    - Enhancing PHP Via the ASP.NET AJAX Framework...
    - Enhancing PHP Programming with the ASP.NET A...
    - Classes and ASP.NET AJAX
    - Using ASP.NET AJAX
    - Building a Simple Storefront with LINQ

     
    Application Delivery: Everything You Wanted to Know, but Didn`t Know You Needed to Ask
    A comprehensive guide to examining the topics of Wide-area Data Services and app....

     
    Best Practices: Safe and Secure Hardware Asset Recovery
    Companies increasingly must meet EPA and local requirements for the disposal of ....

     
    Managing SSL Security in Multi-Server Environments
    Read this white paper to learn how to simplify management of your organization's....

     
    Open Source Security Myths
    Open Source Software (OSS) is computer software whose source code is available t....

     
    Power and Cooling Capacity Management for Data Centers
    This paper describes the principles for achieving power and cooling capacity man....

     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
    Stay green...Green IT