Asp classic mail send

A blast from the past!

In ASP Classic, you can send an email using the Mail object. Here's an example:

<%
    Dim objMail
    Set objMail = Server.CreateObject("CDO.Message")

    objMail.From = "[email protected]"
    objMail.To = "[email protected]"
    objMail.Subject = "Test Email"
    objMail.BodyPart.Charset = "UTF-8"
    objMail.BodyPart.Content-Type = "text/plain"
    objMail.BodyPart.Text = "This is a test email sent using ASP Classic."

    objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
    objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "your_smtp_server"
    objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
    objMail.Configuration.Fields.Update

    objMail.Send

    Set objMail = Nothing
%>

In this example, we create a CDO.Message object and set its properties to define the email. We then configure the SMTP server settings using the Configuration object. Finally, we call the Send method to send the email.

Note that you'll need to replace the placeholders (your_email_address, recipient_email_address, and your_smtp_server) with your actual email address, recipient's email address, and SMTP server settings.

Also, make sure that the CDO component is installed and registered on your server. If you're using IIS 6 or later, you may need to enable the CDO component in the IIS Manager.