ASP Code
  Home arrow ASP Code arrow Inbox and Outbox Manipulation in ASP
Iron Speed
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 
Dedicated Servers 
Download TestComplete 
Windows Web Hosting
 
IBM® developerWorks 
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 CODE

Inbox and Outbox Manipulation in ASP
By: Burhan Khan
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 190
    2005-02-22

    Table of Contents:
  • Inbox and Outbox Manipulation in ASP
  • CDO is not everything
  • Receiving Email: Inbox
  • Inbox using CDO

  • 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
     
     
    Iron Speed
     
    ADVERTISEMENT

    Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!

    Inbox and Outbox Manipulation in ASP
    (Page 1 of 4 )

    Have you ever wanted to use Active Server Pages for sending and receiving email? Burhan Khan explains how to use CDO to set this up.There are numerous ways to send and receive emails using ASP. The simplest way is to use CDO. CDO is a free emailing component which comes packaged with NT Option Pack 4. If you want to receive email, you can use the CDO session object. This article will explain ways to  sending and receive email through ASP 3.0. After you finish reading it, you will be able to design a simple Web page for sending and receiving email.

    Sending Emails Using CDO: Outbox

    Sending email through Active Server Pages is not a difficult task. There are too many ASP components that are used to send email using ASP. One method growing in popularity is the Collaborative Data Object (CDO). One reason for its popularity is that it is a fast and free method of sending email. Another reason is that it ships with NT Option Pack 4 by default, so you don’t need to buy and install it.

    To start sending email, the first step is to create an instance of a CDO object in your ASP code. It is as simple as:

    <%

    dim objMail

    set objMail = Server.CreateObject("CDONTS.NewMail")

    %>

    CDONTS.NewMail has easy to use properties and methods. These include ".TO," ".From," ".CC," ".BCC," ".Subject," and ".Body." Let's look at some code:

    <%

    objMail.To = "burhansk@hotmail.com"

    objMail.From = "user@yahoo.com"

    objMail.cc = "me@mydomain.com"

    objMail.bcc = "me_bcc@mydomain.com"

    objMail.Subject = "This is subject line"

    objMail.Body = "Here is body of email"

    objMail.Send

    %>

    In the above code, I initialize CDO properties, and use .Send to send email. One wonderful thing about CDO is that, if you use an incorrect email address in properties, CDO will never send through any error, but it also will not send email. So correct email addresses are compulsory.

    CDO also has too many features, like file attachment, priority, HTML body, and so forth. I am not going to explain these features of CDO because too many articles have already been written on this issues. Let's explore some other issues.

    More ASP Code Articles
    More By Burhan Khan


       · Why are you talking about the NT4 update?Sheezeesss... who's still running that...
       · 2000 and XP are also NT bassed OS.By NT4 means, 2000 or XP (Service pack 4...
       · Saying "NT4" is *NOT* the same as saying "Windows 2000 with service pack...
       · hi this is thoma, just a month before i started my career in ASP. here i...
       · So why don't you contribute instead of berating someone else who has taken the time...
     

    ASP CODE ARTICLES

    - ASP Forms
    - ASP: The Beginning
    - Getting Remote Files With ASP Continued
    - Inbox and Outbox Manipulation in ASP
    - Relational DropDownList Using VB.NET
    - Ad Tracking URL Hits
    - Use ViewState to display one record per page...
    - Send Email using ASP.NET formatted in HTML
    - ASP File Explorer
    - ASP/XML Interview questions by Srivatsan Sri...
    - Various methods of setting Date values to a ...
    - Conditional DataGrid Item and using checkbox...
    - Fill .NET Listbox with SQL DataReader
    - Filling Dropdown box using Code-Behinds in C#
    - FLAMES code sample written in .NET What is F...




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