Last updated: August 27, 2026.
Classic ASP can submit mail through CDO Message when an SMTP relay is available. Keep credentials in protected server configuration and require encrypted transport.
<%
Dim config, message
Set config = Server.CreateObject("CDO.Configuration")
With config.Fields
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.example.com"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 587
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = Application("SMTP_USER")
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = Application("SMTP_PASSWORD")
.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
.Update
End With
Set message = Server.CreateObject("CDO.Message")
Set message.Configuration = config
message.From = "[email protected]"
message.To = "[email protected]"
message.Subject = "Contact request"
message.TextBody = "A contact request was received."
message.Send
%>Validate recipients, limit attachments, and log failures without recording passwords or sensitive content.