C#
  Home arrow C# arrow Sending Simple E-Mail in C#
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? 
C#

Sending Simple E-Mail in C#
By: Barzan "Tony" Antal
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 6
    2008-08-12

    Table of Contents:
  • Sending Simple E-Mail in C#
  • Theory
  • Implementations
  • Final Thoughts

  • 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 Simple E-Mail in C#


    (Page 1 of 4 )

    It’s been decades since carrier pigeons became digitalized and supercharged. Nowadays sending a mail has become synonymous with sending an e-mail, meaning electronic mail, and usually this delivery process takes less than a second. As a result, we're required to send e-mail nearly every day. This article takes a look at how we can accomplish this task in C#.

    Thus, this is going to be a tutorial written in the “how-to” fashion. First, we are going to dwell on the basics and I’m going to explain the theory. This is where we’ll talk about frameworks, functions, libraries, and in short about SMTP servers. We'll also discuss what credentials are and why are they important, as well as  SSL. Later on, we’re going to develop ready-to-run real-world applicable source code that sends mail.

    Throughout this article I’m going to present three solutions to accomplish the task of sending mail using C#. The first will be based on the System.Web.Mail component that is part of the older dot net frameworks (.NET 1.0 and 1.1). If you are coding in those environments then this is going to be useful to you. Next we’ll also present the currently possible solution that is based on the latest .NET frameworks.

    Here I’m talking about .NET 2.0 and 3.5 (3.x). We are going to use the following components: System.Net and System.Net.Mail. These are all part of the latest dot net Frameworks. At the end of the article you will be able to download the archived source code of this tiny little application. By this point everything should make sense and you’ll see the difference between the older solution and this one.

    Ultimately, as the third solution, we’ll present the commercial component package called Chilkat, specifically their best-selling mail components: Chilkat Mail. We can use its 30-day trial period; that is more than enough time for us to play around and see how it performs, what we can do with it, and so forth. You’ll see a code sample that is based on Chilkat Mail, too. And that's everything in a nutshell.

    All of this being said, let’s get started.

    More C# Articles
    More By Barzan "Tony" Antal


       · MessageBox.Show(ex.Message, "Error: " + ex.Message, MessageBoxButtons.OK,...
     

    C# ARTICLES

    - C# and XML
    - Pointers and Arrays in C#
    - C# 3.0 Extension Methods
    - Overloading Operators in C#
    - Iterators and Nullable Types
    - Patterns and Iterators in C#
    - C# Exceptions
    - Methods in C#
    - Delegates and Events in C#
    - Advanced C#
    - Working with Regular Expressions in C#
    - Sending Simple E-Mail in C#
    - Building C# Comparable Objects: IComparable ...
    - Color Transformation Applications in C# GDI+...
    - Performing Color Transformation Operations i...





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