CDONTS stands for 'Collaboration Data Objects for
Windows NT Server' and as the name suggest it is for NT, sorry Win9x
users you don't have this component. The CDONTS component is installed when you
install IIS on NT4 and Windows 2000. Although the component will run on Windows
XP, Microsoft have decided to remove the component from IIS 5.1 on Windows XP,
so you will have to track down a copy of the cdonts.dll and register it on the
IIS web server.
To use this component to send e-mail you also need the
SMTP Server that ships with IIS 4 or 5 installed on the web server. The SMTP
server is usually installed by default with the standard IIS installation.
Windows NT Server' and as the name suggest it is for NT, sorry Win9x
users you don't have this component. The CDONTS component is installed when you
install IIS on NT4 and Windows 2000. Although the component will run on Windows
XP, Microsoft have decided to remove the component from IIS 5.1 on Windows XP,
so you will have to track down a copy of the cdonts.dll and register it on the
IIS web server.
To use this component to send e-mail you also need the
SMTP Server that ships with IIS 4 or 5 installed on the web server. The SMTP
server is usually installed by default with the standard IIS installation.
01. <%
02. color=red>Dim objCDOMail
03. Set objCDOMail =
color=rosybrown>Server.CreateObject("CDONTS.NewMail")
02. color=red>Dim objCDOMail
03. Set objCDOMail =
color=rosybrown>Server.CreateObject("CDONTS.NewMail")
04. objCDOMail.From = "
href="mailto:fromEmail@fromDomain.com">fromEmail@fromDomain.com"
05.
objCDOMail.To = "toEmail@toDomain.com"
06. objCDOMail.Cc = " href="mailto:ccEmail@ccDomain.com">ccEmail@ccDomain.com"
07.
objCDOMail.Bcc = "bcc@mailDomain.com"
08. objCDOMail.Subject = "Subject"
09. objCDOMail.BodyFormat = 0
10.objCDOMail.MailFormat = 0
11. objCDOMail.Body = "MailBody"
12.
objCDOMail.Importance = 1
13. objCDOMail.Send
14. color=red>Set objCDOMail = Nothing
15. color=royalblue>%>
05.
objCDOMail.To = "toEmail@toDomain.com"
06. objCDOMail.Cc = " href="mailto:ccEmail@ccDomain.com">ccEmail@ccDomain.com"
07.
objCDOMail.Bcc = "bcc@mailDomain.com"
08. objCDOMail.Subject = "Subject"
09. objCDOMail.BodyFormat = 0
10.objCDOMail.MailFormat = 0
11. objCDOMail.Body = "MailBody"
12.
objCDOMail.Importance = 1
13. objCDOMail.Send
14. color=red>Set objCDOMail = Nothing
15. color=royalblue>%>
Explanation According to
Line
Line
01. Open ASP tag
02.
Declare a variable named objCDOMail
03. color=black>Create instance of Mailer control
02.
Declare a variable named objCDOMail
03. color=black>Create instance of Mailer control
04. Set Mailer control properties and collection items
class=comments>05. Set Mailer control properties and collection items
06. Set Mailer control properties and collection items
07. Set Mailer control properties and collection items
08. Set Mailer control properties and collection items
09. Set Mailer control properties and collection
items
items
10. Set Mailer control properties and collection
items
items
11. Set Mailer control properties and collection
items
items
12. Set Mailer control properties and collection
items
items
13. Send Mail
14. Release
resources
15.Close ASP tag
14. Release
resources
15.Close ASP tag