Many legacy Classic ASP applications send mail through the Windows CDO component using CDO.Message. Whether this works depends on the Windows/IIS environment and SMTP configuration available on the server.
<%
Dim plusMail
Set plusMail = CreateObject("CDO.Message")
plusMail.Subject = "Message from the website"
plusMail.From = "website@example.com"
plusMail.To = "recipient@example.com"
plusMail.TextBody = "This is the text body of the mail"
plusMail.Send
Set plusMail = Nothing
%>
Use a fixed sender address that your mail system authorizes. For contact forms, do not place an arbitrary visitor address directly in From; validate it and use an appropriate Reply-To/configuration pattern supported by your mail setup.
<%
Dim plusMail
Set plusMail = CreateObject("CDO.Message")
plusMail.Subject = "Message from the website"
plusMail.From = "website@example.com"
plusMail.To = "recipient@example.com"
plusMail.CC = "copy@example.com"
plusMail.Bcc = "archive@example.com"
plusMail.TextBody = "This is the text body of the mail"
plusMail.Send
Set plusMail = Nothing
%>
<%
Dim plusMail
Set plusMail = CreateObject("CDO.Message")
plusMail.Subject = "HTML message from the website"
plusMail.From = "website@example.com"
plusMail.To = "recipient@example.com"
plusMail.HTMLBody = "<h1>Welcome</h1><p>This is an HTML message.</p>"
plusMail.Send
Set plusMail = Nothing
%>
HTMLBody. Validate form fields, control message structure on the server, add anti-spam/abuse protection, and avoid exposing SMTP credentials in tutorial output or public source.Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.