CDOSYS is a built-in component in ASP. This component is used to send e-mails with ASP.


Sending e-mail with CDOSYS

CDO (Collaboration Data Objects) is a Microsoft technology that is designed to simplify the creation of messaging applications.

CDOSYS is a built-in component in ASP. We will show you how to use this component to send e-mail with ASP.

The Global.asa file is an optional file that can contain declarations of objects, variables, and methods that can be accessed by every page in an ASP application.


The Global.asa file

The Global.asa file is an optional file that can contain declarations of objects, variables, and methods that can be accessed by every page in an ASP application. All valid browser scripts (JavaScript, VBScript, JScript, PerlScript, etc.) can be used within Global.asa.

The Global.asa file can contain only the following:

pixels

The #include directive is used to create functions, headers, footers, or elements that will be reused on multiple pages.


The #include Directive

You can insert the content of one ASP file into another ASP file before the server executes it, with the #include directive. The #include directive is used to create functions, headers, footers, or elements that will be reused on multiple pages.

A group of ASP files that work together to perform some purpose is called an application. The Application object in ASP is used to tie these files together.


Application Object

An application on the Web may be a group of ASP files. The ASP files work together to perform some purpose. The Application object in ASP is used to tie these files together.

The Session object is used to store information about, or change settings for a user session. Variables stored in the Session object hold information about one single user, and are available to all pages in one application.

A cookie is often used to identify a user.

What is a Cookie?

A cookie is often used to identify a user. A cookie is a small file that the server embeds on the user's computer. Each time the same computer requests a page with a browser, it will send the cookie too. With ASP, you can both create and retrieve cookie values.

How to Create a Cookie?

The "Response.Cookies" command is used to create cookies.

Note: The Response.Cookies command must appear BEFORE the [<]html[>] tag.

The Request.QueryString and Request.Form commands may be used to retrieve information from forms, like user input.


 

User Input

The Request object may be used to retrieve user information from forms.

Form example:

Procedures

The ASP source code can contain procedures and functions

A variable is used to store information.

If the variable is declared outside a procedure it can be changed by any script in the ASP file. If the variable is declared inside a procedure, it is created and destroyed every time the procedure is executed.


 

Lifetime of Variables

A variable declared outside a procedure can be accessed and changed by any script in the ASP file.

You cannot view the ASP source code by selecting "View source" in a browser, you will
only see the output from the ASP file, which is plain HTML. This is because the scripts
are executed on the server before the result is sent back to the browser.

In our ASP tutorial, every example displays the
hidden ASP source code. This will make it easier for you to understand how it works.