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.
Can I use classic asp to built website and can I send email with "CDO.Message"? with example would be appreciable.
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
1 answer
Sort by: Most helpful
-
Bruce (SqlWork.com) 77,926 Reputation points Volunteer Moderator
2023-07-22T20:31:02.8933333+00:00