How to send email from ASP (Part I of II)
Want to send SMTP email from your ASP app? CDONTS is a free e-mail component that comes with IIS4, that (despite its weird name) is very easy to use and has good performance. The setup actually takes longer than the trivial scripting. To set it up, first, make sure you have installed the SMTP service. It is installed with IIS by default, but if you've messed with your settings, you may ahve to reinstall it. Check that the SMTP service shows up in the services part of the control panel and that the file CDONTS.DLL shows up in your System32 directory. Then using the following code. Don't forget to substitute the email address you want to send to for someaddress@someplace.com, which appears twice in the code).
Ringkasan AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
<%
Dim objMail
Set objMail = CreateObject("CDONTS.NewMail")
objMail.Send "someaddress@someplace.com","someaddress@someplace.com","Subject: You are now email enabled!","Yes, you now have the power of SMTP email from your apps, thanks to IIS and CDONTS.Newmail!"
%>