Can I use classic asp to built website and can I send email with "CDO.Message"? with example would be appreciable.

Sujoy 0 Reputation points
2023-07-22T17:20:23.8533333+00:00

Below the code I used, but it is not working.

set sMail = Server.CreateObject("CDO.Message")

sMail.Configuration.Fields.Item ("[http://schemas.microsoft.com/cdo/configuration/sendusing]") = 2 sMail.Configuration.Fields.Item ("[http://schemas.microsoft.com/cdo/configuration/smtpserver]") ="<used correct smtp configuration>"

sMail.Configuration.Fields.Item ("[http://schemas.microsoft.com/cdo/configuration/smtpserverport]") = 25 sMail.Configuration.Fields.Item ("[http://schemas.microsoft.com/cdo/configuration/smtpauthenticate]") = 1 sMail.Configuration.Fields.Item ("[http://schemas.microsoft.com/cdo/configuration/sendusername]") ="used existing email" sMail.Configuration.Fields.Item ("[http://schemas.microsoft.com/cdo/configuration/sendpassword]") ="<used correct password>"

sMail.Configuration.Fields.Update

Need help from anyone with correct syntax or code configuration which will work in web server.

Thanks in advance!

Windows development | Internet Information Services
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 77,926 Reputation points Volunteer Moderator
    2023-07-22T20:31:02.8933333+00:00

    Your code looks ok. The question is the configuration values. This is an old library and security has changed. Most email servers no longer support non ssl connections.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.