|
|
Sending emails with ASP and CDOSending emails from within ASP scripts is one of the simplest things you can do in ASP. To show the simplicity of email, we are going to use CDONTS.Why ? CDONTS is included in IIS4 OP4 (Windows NT4) and in IIS5 (Windows 2000), therefore it's widely supported. Although you can do a lot more with CDO than just send email, we're going to show only it's emailing capabilities. If you've ever used Outlook 97 - 2000, then you know that there's a lot more to it than just email (calendars, journals, agendas, directories, etc.) Let's write some code :
The syntax for the send method above is as follows:
cdosmtp.send([From],[To],[Subject],[Body])
That of course was very simple, but it's not friendly, specially if your body and subject line are more than just a few characters long. Here is a more friendly way of doing the same thing. It takes a little more coding, but it's easier to read and manage.
There are other helpful properties to it such as:
Send this article to a friend. Posted : 11/18/2001 |
|