asp tutorials, asp.net tutorials, sample code, and Microsoft news from 15Seconds
Data Access  |   Troubleshooting  |   Security  |   Performance  |   ADSI  |   Upload  |   Email  |   Control Building  |   Component Building  |   Forms  |   XML  |   Web Services  |   ASP.NET  |   .NET Features  |   .NET 2.0  |   App Development  |   App Architecture  |   IIS  |   Wireless
 
Pioneering Active Server
 Power Search










Active News
15 Seconds Weekly Newsletter
• Complete Coverage
• Site Updates
• Upcoming Features

More Free Newsletters
Reference
News
Articles
Archive
Writers
Code Samples
Components
Tools
FAQ
Feedback
Books
Links
DL Archives
Community
Messageboard
List Servers
Mailing List
WebHosts
Consultants
Tech Jobs
15 Seconds
Home
Site Map
Press
Legal
Privacy Policy
internet.commerce














internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

HardwareCentral
Compare products, prices, and stores at Hardware Central!

Creating Efficient Mail Processing Systems – Part 1
By Thiru Thangarathinam
Rating: 4.1 out of 5
Rate this article


  • email this article to a colleague
  • suggest an article

    Introduction

    Sending mail using the classes in the .NET Framework is a very simple and easy task. When you are creating an enterprise-class application, you need to send mail as part of a transaction. However, as mentioned before, if you want to perform that operation as part of a transaction, you need to approach this problem in a different way. For example, if your business logic component runs within the context of Enterprise Services, you can include the component that sends the mail as part of the same transaction initiated by the business logic component. However, the SMTP service used by the .NET Framework for sending mail does not allow us to enlist the object (that is used for sending mail) as part of an existing transaction. So we need to implement an intermediate storage process that is capable of being enlisted as part of an existing transaction. For this we can use a SQL Server table to store the contents of the mail. When the client component wants to send the mail, it invokes this intermediate component, which stores the details of the mail in a SQL Server table. By setting appropriate transaction attributes in the client component and the mail component, we can run the operations performed by both of them within a single transaction. This provides us with an elegant approach to sending mail from within our application.

    In the .NET Framework, there is a separate namespace called System.Web.Mail that contains all the classes required for sending mail from within a .NET application.

    The above diagram shows the architecture we are going to use for processing mail in the application. Let us define the key elements in the above architecture.

    • Mail Processing Component: This component is used for sending mail. Due to the transaction attributes set in the component, the operations performed by this component can be included as part of the transaction initiated by the client component. When a client component wants to send mail, it creates and populates a generic collection object named MailAttributeCollection class. Apart from the generic collection object, the client component also sends an enum constant named MailTemplate. After receiving the collection object and the enum value, the mail component converts the collection object into an XML string dynamically. Then it loads an external XSL stylesheet based on the value passed to the MailTemplate enum parameter. Finally it transforms the XML string to HTML by applying the loaded XSL stylesheet. Then it stores the mail along with its related attributes in a SQL Server table.
    • XSL File: These external XSL files are used to create the body of the mail. For the purposes of this article, we will consider two types of mail:
      • Category Mail - This mail contains categories information as well as the details about a specific user such as Name, Address, State, Zip and so on.
      • Product Mail - This type of mail contains product information as well as the details about a specific user such as Name, Address, State, Zip and so on.
    • MailAttributeCollection class: This MailAttributeCollection class acts as a generic container that is used to hold all the attributes required for creating the body of the mail.
    • Windows Service: The Windows Service basically polls the SQL Server table for any mail that needs to be sent. If there is any unsent mail, it reads them and sends them using the classes in the System.Web.Mail namespace. After sending those pieces of mail, it then updates their status to 1 to indicate that they have already been sent.
    • Database: The SQL Server table named MailQueue is used as an intermediate storage mechanism where mail is stored temporarily before they are picked up and processed by the Windows Service running in the background.

    Implementation

    To implement this mail processing architecture, we will create a new Visual C# Class Library project named MailProcessingLib as shown in the following screenshot.

    Once the project is created, we will add a new class named MailAttributeCollection, the implementation of which is shown in the following section.

    MailAttributeCollection class

    The MailAttributeCollection class acts as a generic container object that is used to hold all the attributes that make up the body of the mail. This class is marked with the attribute Serializable that ensures all the public attributes present in the class can be serialized when the object is marshaled across the wire.

    
    using System;
    using System.Web.Mail;
    
    namespace MailProcessingLib
    {
    	[Serializable]
    	public class MailAttributeCollection
    	{
    		string toList = "";		
    		string ccList = "";
    		string bccList = "";		
    		string subject = "";			
    		string attachments = "";			
    		//Set the default to Normal
    		MailPriority priority = MailPriority.Normal;
    
    		string name="";
    		string address="";
    		string state="";
    		string zip="";
    		string productName="";
    		string productDescription="";		
    		string categoryName="";
    		string categoryDescription="";
    
    		public MailAttributeCollection()
    		{			
    		}
    
    		public string ToList
    		{
    			get
    			{
    				return toList;
    			}
    			set
    			{
    				toList = value;
    			}
    		}
    
    		public string CCList
    		{
    			get
    			{
    				return ccList;
    
    			}
    			set
    			{
    				ccList = value;
    			}
    		}
    
    		public string BccList
    		{
    			get
    			{
    				return bccList;
    			}
    			set
    			{
    				bccList = value;
    			}
    		}
    		
    		public string Subject
    		{
    			get
    			{
    				return subject;
    			}
    			set
    			{
    				subject = value;
    			}
    		}
    			
    		public MailPriority Priority
    		{
    			get
    			{
    				return priority;
    			}
    			set
    			{
    				priority = value;
    			}
    		}
    	
    		public string Attachments
    		{
    			get
    			{
    				return attachments;
    			}
    			set
    			{
    				attachments = value;
    			}
    		}
    
    		public string Name
    		{
    			get
    			{
    				return name;
    			}
    			set
    			{
    				name = value;
    			}			
    		}
    		public string Address
    		{
    			get
    			{
    				return address;
    			}
    			set
    			{
    				address = value;
    			}
    		}
    
    		public string State
    		{
    			get
    			{
    				return state;
    			}
    			set
    			{
    				state = value;
    			}
    		}
    		public string Zip
    		{
    			get
    			{
    				return zip;
    			}
    			set
    			{
    				zip = value;
    			}
    		}
    
    		public string ProductName
    		{
    			get
    			{
    				return productName;
    			}
    			set
    			{
    				productName = value;
    			}
    		}
    
    		public string ProductDescription
    		{
    			get
    			{
    				return productDescription;
    			}
    			set
    			{
    				productDescription = value;
    			}
    		}
    
    		public string CategoryName
    		{
    			get
    			{
    				return categoryName;
    			}
    			set
    			{
    				categoryName = value;
    			}
    		}
    
    		public string CategoryDescription
    		{
    			get
    			{
    				return categoryDescription;
    			}
    			set
    			{
    				categoryDescription = value;
    			}
    		}
    	}
    }
    
    
    As you can see, the MailAttributeCollection class defines a number of private variables, which are then exposed to the consumers of the object in the form of public properties. Some of the important properties exposed by the object include ToList, CCList, BccList, Subject, Attachments and so on that are used to define the various attributes of the mail we want to send. It also includes other properties such as CategoryName, CategoryDescription that are specific to a certain type of mail. For example, the ProductName and ProductName properties are used to create the body of the mail when mail related to Products needs to be sent from within the application. You will see an example of this in action, when creating the body of the mail using the methods in the MailHelper class.

    MailHelper Class

    This class provides the core foundation for the mail processing architecture by exposing a method named SendMail that basically performs the core operation. When a client component wants to send mail, it creates an instance of the MailAttributeCollection class and populates its properties with appropriate values. Then it invokes the SendMail method of MailHelper class passing in the populated MailAttributeCollection object. Apart from the MailAttributeCollection class, it also passes an enum constant named MailTemplate that indicates the type of mail that needs to be sent out. For example, to send out mail that is related to the products, the value MailTemplate.ProductInformation is passed in as a parameter.

    using System;

    using System.Xml;

    using System.Xml.Xsl;

    using System.IO;

    using System.Web.Mail;

    using System.Data;

    using System.Data.SqlClient;

     

     

    namespace MailProcessingLib

    {

    public class MailHelper

    {

           public MailHelper()

           {

           }

    As mentioned before, the SendMail method takes a MailAttributeCollection object and a MailTemplate enum constant as its arguments.

    public void SendMail(MailTemplate template,   

    MailAttributeCollection mailAttrCollection)

           {

    In the following line, it creates an instance of the AppSettingsReader object that is used to read the configuration settings from a configuration file.

    System.Configuration.AppSettingsReader configurationAppSettings

    = new System.Configuration.AppSettingsReader();

    All the configuration settings required for mail processing are stored in a file named app.config. This file is part of the client application that invokes the mail processing component. When invoked, the mail processing component automatically reads the settings from the client configuration file. The configuration settings are defined as follows in the app.config file.

    
    <?xml version="1.0" encoding="Windows-1252"?>
    <configuration>
      <appSettings>
        <add key="fromMailAddress" value="test@test.com" />
        <add key="stylesheetLocation" value="D:\My Programs\15Seconds\Efficent   
        Mail Processing\MailProcessingLib\Stylesheets" />
        <add key="attachmentsLocation" value="D:\My Programs\15Seconds\Efficent 
        Mail Processing\MailProcessingLib\Attachments" />       
        <add key="connectionString" 
        value="server=localhost;uid=sa;pwd=thiru;database=15Seconds;" />       
      </appSettings>
    </configuration>
    
    
    To retrieve the value of the element fromMailAddress from the configuration file, you need to add the following line of code.

    //Get the From EMail Address

                  string fromMailAddress =

                  string)(configurationAppSettings.GetValue("fromMailAddress",

                  typeof(string))));        

    Then we convert the attributes contained in the MailAttributeCollection object to a dynamic XML string using a private Helper method named CreateXmlDocument.

                  //Convert the MailAttributeCollection object into an xml

                  document object that can be used for transformation

                  XmlDocument xmlDoc = CreateXmlDocument(mailAttrCollection);

                  string  xslStlyesheet;

    Here we evaluate the value of the enum constant MailTemplate to determine the XSL stylesheet to load in the memory.

                  //Determine the stylesheet to be used for transformation

                  switch (template)

                  {

                         case MailTemplate.CategoriesInformation:

                               xslStlyesheet = "CategoriesInformation.xsl";

                               break;

                         case MailTemplate.ProductsInformation:

                               xslStlyesheet = "ProductsInformation.xsl";

                               break;                    

                         default:

                               /Assign the CategoriesInformation.xsl as the

                               default stylesheet

                               xslStlyesheet = "CategoriesInformation.xsl";

                               break;

                         }                                

    After that, we load the XSL stylesheet onto the memory by appending the value of the location of the stylesheet (that is retrieved from the configuration file) with the name of the stylesheet. To accomplish this, we use the Load method of the XslTransform object.

                         XslTransform transform = new XslTransform();                               //Get the stylesheets folder location from the

                         configuration file

                  string stylesheetDirectory  =                                        ((string)(configurationAppSettings.GetValue

    ("stylesheetLocation", typeof(string))));             

                         //Load the stylesheet into the memory

                         transform.Load(stylesheetDirectory + "\\" + 

                         xslStlyesheet);

    Once the stylesheet is loaded onto the memory, we can then easily transform the XML contents to an HTML document by applying XML and XSL. To do this, we need to pass in the XmlDocument object that is created from the CreateXmlDocument method as well as a StringWriter object to the Transform method of XslTransform object. The Transform method combines XML with XSL and stores the resultant HTML document in the StringWriter object that is passed in as an argument.

                         //Create an instance of StringWriter object to hold the

                         transformed HTML

                         StringWriter writer = new StringWriter();

                         //Transform the xml contents into HTML by applying the

                         stylesheet                              

                         transform.Transform(xmlDoc,null,writer);

                         //Get the body of the mail from the StringWriter object

                         string body = writer.ToString();                      

    Finally we save the body of the mail as well as all the related mail attributes such as ToList, CCList, BccList and so on to a Sql Server table by invoking the private helper method named SaveMail.

                         SaveMail(fromMailAddress,mailAttrCollection.ToList,

    mailAttrCollection.CCList,                      mailAttrCollection.BccList,mailAttrCollection.Subject,       (int)mailAttrCollection.Priority,body,

    mailAttrCollection.Attachments);

    XSL Files
    As mentioned before, we use XSL to create the presentation for the body of the mail. One of the main advantages of using XSL is that we can easily change the contents of the mail if there is a need to do so. To change the presentation of the mail, all you need to do is modify the XSL file without even having to touch the code that sends out mail. This provides us with an extensible approach that can be very useful in maintaining the application, especially considering the drastic changes that are likely to happen in the business process. Another advantage of using XSL is that if you want to send a different type of mail (For example, a text-based mail) instead of an HTML based mail, all you need to do is change the XSL file. For the purposes of this article, two XSL files named ProductsInformation.xsl and CategoriesInformation.xsl are used. You can download the XSL files along with the code for the mail processing component from the 15Seconds Web site.

    CreateXmlDocument Method
    The CreateXmlDocument method takes in the MailAttributeCollection object as its argument. It starts off by creating an instance of the XmlDocument object that is used to hold the XML string. Then it creates a root XML node named MailRoot under which it adds all the attributes of the MailAttributeCollection object as child elements. Finally it returns the XmlDocument object back to the calling method.

    private XmlDocument CreateXmlDocument(MailAttributeCollection mailAttrContainer)

    {                         

           //Create an instance of XmlDocument

           XmlDocument xmlDoc = new XmlDocument();               

           //Create a root node that acts as the parent for all the nodes

           XmlNode rootNode =

    In the following line, it creates a node named MailRoot that acts as a parent node under which all the attributes of the MailAttributeCollection object are stored.

           xmlDoc.CreateNode(XmlNodeType.Element,"MailRoot",null);

           XmlNode childNode;

    Once the root node is created, it then creates all the remaining nodes such as Name, Address, State, Zip and so on and adds them to the root node.

           //Create User Details under the root node

           childNode =  xmlDoc.CreateNode(XmlNodeType.Element,"Name",null);           childNode.InnerText = mailAttrContainer.Name;

           rootNode.AppendChild(childNode);

           childNode =  xmlDoc.CreateNode(XmlNodeType.Element,"Address",null);  childNode.InnerText = mailAttrContainer.Address;

           rootNode.AppendChild(childNode);

           childNode =  xmlDoc.CreateNode(XmlNodeType.Element,"State",null);          childNode.InnerText = mailAttrContainer.State;

           rootNode.AppendChild(childNode);

           childNode =  xmlDoc.CreateNode(XmlNodeType.Element,"Zip",null);            childNode.InnerText = mailAttrContainer.Zip;

           rootNode.AppendChild(childNode);

           //Create Recipient details

           childNode = 

           xmlDoc.CreateNode(XmlNodeType.Element,"ProductName",null);                 childNode.InnerText = mailAttrContainer.ProductName;

           rootNode.AppendChild(childNode);

           childNode = 

           xmlDoc.CreateNode(XmlNodeType.Element,"ProductDescription",null);          childNode.InnerText = mailAttrContainer.ProductDescription;

           rootNode.AppendChild(childNode);                      

           childNode =

           xmlDoc.CreateNode(XmlNodeType.Element,"CategoryName",null);

           childNode.InnerText = mailAttrContainer.CategoryName;

           rootNode.AppendChild(childNode);

           //Add all the dates

           childNode =

           xmlDoc.CreateNode(XmlNodeType.Element,"CategoryDescription",null);

           childNode.InnerText = mailAttrContainer.CategoryDescription;

           rootNode.AppendChild(childNode);

    Finally it appends the root node to the previously created XmlDocument object and returns it back to the calling method.

           xmlDoc.AppendChild(rootNode);           

           //Return the created XmlDocument object to the caller

           return xmlDoc;

    SaveMail Method
    In the SaveMail method, we execute a stored procedure named usp_AddMailMessage and add information about the mail to the MailQueue table. Before we take a look at the code required for executing the stored procedure, let us understand the stored procedure itself.

    Create procedure usp_AddMailMessage

    @fromMailAddress varchar(256), @toMailAddress varchar(1028),

    @ccList varchar(1028), @bccList varchar(1028), @subject varchar(256),

    @priority int, @body varchar(8000), @attachments varchar(1028),

    @mailSent tinyint

     

    as

    Begin

    Set nocount on

    Insert into MailQueue

    (FromMailAddress,ToMailAddress,CCList,BccList,

    Subject,Body,Priority,Attachments,MailSent)

    Values

    (@fromMailAddress,@toMailAddress,@ccList,@bccList,@subject,@body,@priority,@attachments,@mailSent)

    End

    As you can see from the above, code for the stored procedure is straightforward. It basically receives the supplied parameters and uses them to insert a record into the MailQueue table. Now that we have understood the code required for the stored procedure, we are ready to look at the code that executes the stored procedure.

    private void SaveMail(string from, string toList, string ccList,string bccList, string subject, int importance, string body, string attachments)

    {

    To start with, we retrieve the connection string from the configuration file using the AppSettingsReader class.

           System.Configuration.AppSettingsReader configurationAppSettings = new

           System.Configuration.AppSettingsReader();

           string connString = 

           ((string)(configurationAppSettings.GetValue("connectionString",

           typeof(string))));

    Here we create an instance of the SqlConnection object passing in the retrieved connection string as its argument.

           SqlConnection sqlConn = new SqlConnection(connString);

           sqlConn.Open();

    Now we create a SqlCommand object and pass to it the name of the stored procedure as well as the SqlConnection object as arguments.

           SqlCommand command = new SqlCommand("usp_AddMailMessage", sqlConn);

           command.CommandType = CommandType.StoredProcedure;                  

    Once we initialize the SqlCommand object with the required parameters, we can then create all the parameters used by the stored procedure and add them to the SqlCommand object.

           //Set the From Parameter

           SqlParameter paramFromMailAddress = new

           SqlParameter("@fromMailAddress", SqlDbType.VarChar,50);

           paramFromMailAddress.Direction = ParameterDirection.Input;

           paramFromMailAddress.Value = from;

           command.Parameters.Add(paramFromMailAddress);

           //Set the To Parameter

           SqlParameter paramToMailAddress = new SqlParameter("@toMailAddress",

           SqlDbType.VarChar,1028);

           paramToMailAddress.Direction = ParameterDirection.Input;

           paramToMailAddress.Value = toList;

           command.Parameters.Add(paramToMailAddress);

           //Set the CC Parameter

           SqlParameter paramCCMailAddress = new SqlParameter("@ccList",

           SqlDbType.VarChar,1028);

           paramCCMailAddress.Direction = ParameterDirection.Input;

           paramCCMailAddress.Value = ccList;

           command.Parameters.Add(paramCCMailAddress);

           //Set the BCC Parameter

           SqlParameter paramBccMailAddress = new SqlParameter("@bccList",

           SqlDbType.VarChar,1028);

           paramBccMailAddress.Direction = ParameterDirection.Input;

           paramBccMailAddress.Value = bccList;

           command.Parameters.Add(paramBccMailAddress);

           //Set the Subject Parameter

           SqlParameter paramSubject = new SqlParameter("@subject",

           SqlDbType.VarChar,256);

           paramSubject.Direction = ParameterDirection.Input;

           paramSubject.Value = subject;

           command.Parameters.Add(paramSubject);

           //Set the Priority Parameter

           SqlParameter paramPriority = new SqlParameter("@priority",

           SqlDbType.Int);

           paramPriority.Direction = ParameterDirection.Input;

           paramPriority.Value = importance;

           command.Parameters.Add(paramPriority);

           //Set the Body Parameter

           SqlParameter paramBody = new SqlParameter("@body",

           SqlDbType.VarChar,8000);

           paramBody.Direction = ParameterDirection.Input;

           paramBody.Value = body;

           command.Parameters.Add(paramBody);

           //Set the Attachments parameter

           SqlParameter paramAttachments = new SqlParameter("@attachments",

           SqlDbType.VarChar,256);

           paramAttachments.Direction = ParameterDirection.Input;

           paramAttachments.Value = attachments;

           command.Parameters.Add(paramAttachments);

           //Set the MailSent parameter

           SqlParameter paramMailSent = new SqlParameter("@mailSent",

           SqlDbType.TinyInt);

           paramMailSent.Direction = ParameterDirection.Input;

           paramMailSent.Value = 0;

           command.Parameters.Add(paramMailSent);

    Once all the parameters are created, we can then execute the stored procedure. We accomplish this by invoking the ExecuteNonQuery method of the SqlCommand object.

           //Execute the stored procedure

           command.ExecuteNonQuery();

    }            

    MailTemplate Enum Constant

    The MailTemplate enum constant is used to determine the type of mail that we want to send using the mail processing component. For the purposes of this article, we define two types of mail using enum values ProductsInformation and CategoriesInformation. As the name suggests, they are used to indicate if we want to send products mail or categories mail.

    using System;

     

    namespace MailProcessingLib

    {

          public enum MailTemplate

          {

                ProductsInformation = 1,           

                CategoriesInformation = 2          

          }

     

    }

    Putting It All Together

    As we have seen so far, sending mails using this mail processing architecture involves two steps. In the first step, the client component creates the MailAttributeCollection object and sends it to the SendMail method of the MailHelper class along with the MailTemplate enum parameter. The SendMail method dynamically converts the MailAttributeCollection object into an XML string, which is then combined with XSL to create the HTML representation of the body of the mail. Once we create the HTML representation of the mail, we then store it in a SQL Server table named MailQueue. Since the mail contents are stored in a SQL Server table, we can very easily run the mail processing component as part of an existing transaction. We will see how to do this in part two of this article. The second step involves the use of a Windows Service component, which periodically checks the MailQueue table for mails that are not yet sent. It loops through all of those unsent pieces of mail and sends them to their recipients using the classes contained in the System.Web.Mail namespace. Again, we will see this in part two of this article.

    Conclusion

    In this article, we have seen how to use a combination of XSL and XML to create the contents of mail. We also understood how the XSL approach provides a number of advantages when used for creating the body of the mail. In part two of this article, we will see how to enlist our mail processing component as part of an existing transaction initiated by the client component. We will also see how to read mail from the SQL Server table and send out mail to the users.

    I hope you find this article useful and thanks for reading.

    About the Author

    Thiru has almost six years of experience in architecting, designing, developing and implementing applications using Object Oriented Application development methodologies. He also possesses a thorough understanding of software life cycle (design, development and testing).

    He is an expert with ASP.NET, .NET Framework, Visual C#.NET, Visual Basic.NET, ADO.NET, XML Web Services and .NET Remoting and holds MCAD for .NET, MCSD and MCP certifications.

    Thiru has authored numerous books and articles. He can be reached at thiruthangarathinam@yahoo.com.

  • Rate This Article
    Not HelpfulMost Helpful
    1 2 3 4 5
    Supporting Products/Tools
    AspEmail
    Free SMTP component that supports multiple file attachments, unlimited recipients, CC's, BCC's and REPLY-TO's. Sends messages as plain text or in the HTML format. Premium features include message queuing and deferred processing for high mail volumes. When used with AspEncrypt, generates S/MIME-enabled secure mail.
    [Top]
    AspMail
    AspMail supports multiple file attachments (MIME and UUE), US ASCII and ISO-8859-1 character sets, 8bit subject lines, custom message content headers, custom message headers, MS Exchange priority headers, PGP and more.
    [Top]
    DevMailer 1.0
    DevMailer adds SMTP email sending abilities to ASP or Perl programs. Features include: attachments, failsafe queueing, redundant servers, standard message file support, and advanced activity logging. Also verify email addresses and send multiple messages on a single connection.
    [Top]
    JangoMail
    JangoMail, located at JangoMail.com, is a web-based service that sends mass e-mails by connecting to data from your SQL Server or ODBC compliant database. Unlike traditional ASP e-mail components, the JangoMail service can also handle unsubscribes and bounces automatically and synchronize these with your original web database. The only setup that is required is the placement of one ASP file on your web server. Other features include message open tracking and click tracking.
    [Top]
    JMail
    Send Email directly from you web page via your webserver. jMail will not start up any annoying email clients, just smoothly send the mail via the mailserver. Implement it with easy ASP code.
    [Top]
    Mail for .NET
    Mail for .NET is the first product for the NetToolworks.NET framework. Together they provide methods that send, receive, compose, edit, encode and decode e-mail messages. SMTP, POP, complex MIME messages, HTML messages, and file/memory streaming are also supported.
    [Top]
    OCXMail
    A single component that is limited in scope to five methods. The OCXMail ASP component allows you to send mail using the standard SMTP protocol from any program that can use ActiveX/OLE components.
    [Top]
    ocxQMail
    The ocxQmail ASP component allows you to send mail using the standard SMTP protocol from any program that can use ActiveX/OLE components. ocxQmail queues up messages for batch delivery by a companion NT Service at intervals you specify in the Administration Windows GUI. Your ASP pages do not have to wait for the mail message to be physically sent before continuing.
    [Top]
    RobustPop3
    RobustPOP3 component allows you to retrieve mail using POP3 protocol. Features include: Retrieve Messages Multiple File Attachments, File Attachments support MIME and UUEncode.
    [Top]
    SA-SmtpMail
    A full-featured SMTP e-mail client component that allows developers to send e-mail from any client. This award-winning control offers significantly better performance than other popular SMTP components. SoftArtisans SMTPmail is written in high-performance C++ and supports all threading models, file attachments and multiple encoding schemes. New features in version 2.0 include login authentication and mass mail. The new version also supports PGP encryption.
    [Top]
    Other Articles
    Jul 14, 2003 - Creating Efficient Mail Processing Systems - Part 2
    Learn how to run the mail processing component from the first part using Transaction Services provided by COM+ Enterprise Services and see how to use the information available in the SQL Server table to actually send out mail from a Windows Service.
    [Read This Article]  [Top]
    Feb 3, 2003 - Validating E-mail Against the Mail Server
    Calvin Luttrell takes e-mail validation to another level by building a .NET Web service that validates a user's e-mail address against the user's e-mail mail server.
    [Read This Article]  [Top]
    Dec 20, 2002 - Building a .NET E-mail Application - Part 1
    Remie Bolte begins his series on developing .NET SMTP and POP3 e-mail components for an outlook express look-alike Web-based e-mail application. This article provides a thorough overview of the SMTP RFC.
    [Read This Article]  [Top]
    Oct 16, 2001 - Implementing an E-mail Content Filter Using CDO
    Stop SPAM from sliding through your e-mail system. George Walker shows how to create an e-mail content filter for the Windows 2000 SMTP service using Microsoft Collaboration Data Objects.
    [Read This Article]  [Top]
    Oct 2, 2001 - Creating PGP-Encrypted E-Mails
    PGP is an encryption program being used for secure transmission of files and e-mails. This article explains the concepts of PGP, provides details about installing and configuring the command-line version of PGP, and explains how an encrypted e-mail can be generated from ASP.
    [Read This Article]  [Top]
    Jan 20, 2000 - Accessing Outlook 98 Contacts in ASP Pages
    Dennis Adams explains how accessing Outlook 98 Contacts via a Public Folder from ASP pages is possible if attention is paid to properly installing the necessary components, and configuring the IIS and Exchange Server components. Adams offers some prerequisites, a detailed list of sample code segments, and a complete list of reference materials and related Technet articles.
    [Read This Article]  [Top]
    Dec 17, 1999 - How to Send Secure Mail in ASP-Based E-Commerce Applications
    Peter Persits' article explains how Secure Multipurpose Internet Mail Extensions, or S/MIME, has come to rescue of e-commerce Web sites that need some order information to be contained in encrypted E-mail. Customers don't want to use automatic on-line credit card authorization, so order information instead is sent over an SSL-protected HTML form and credit card numbers are sent via encrypted E-mail for manual processing.
    [Read This Article]  [Top]
    Oct 7, 1999 - Using the WSH on the Desktop
    In this article Shahriar Moosavizadeh uses a script to report each day's sales data via E-mail to the sales manager. The Windows Scripting Host allows scripts to be executed directly on the desktop and create a report without having to run the script within the HTML document or ASP page. Included is a sample script that both builds the report and E-mails it to the sales manager, and step-by-step screenshots and instructions.
    [Read This Article]  [Top]
    Mar 25, 1998 - Collaboration Data Object and IIS 4.0
    Collaboration Data Object (CDO) is a COM library designed to send mail through SMTP or Microsoft Exchange. If you install the SMTP server that comes with Microsoft Option Pack 4, you can send mail from an Active Server page using CDO. Because CDO is comes with Microsoft Option Pack 4, CDO is free.
    [Read This Article]  [Top]
    Apr 6, 1997 - Creating a List Server with ASP
    This issue describes how to make a list server using Active Server, SQL Server, and Stephen Genusa's ASPMail Component. Included are source and instructions for adding the user to the list from a Active Server page, removing the user from the list via a Active Server page, and sending mail to the whole list.
    [Read This Article]  [Top]
    Mailing List
    Want to receive email when the next article is published? Just Click Here to sign up.

    Support the Active Server Industry



    JupiterOnlineMedia

    internet.comearthweb.comDevx.commediabistro.comGraphics.com

    Search:

    Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

    Jupitermedia Corporate Info


    Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

    Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers